@parca/profile 0.19.13 → 0.19.14
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/MatchersInput/index.d.ts +3 -1
- package/dist/MatchersInput/index.d.ts.map +1 -1
- package/dist/MatchersInput/index.js +8 -4
- package/dist/ProfileSelector/QueryControls.d.ts.map +1 -1
- package/dist/ProfileSelector/QueryControls.js +1 -1
- package/dist/ProfileSelector/index.d.ts.map +1 -1
- package/dist/ProfileSelector/index.js +4 -2
- package/dist/SimpleMatchers/index.d.ts +2 -0
- package/dist/SimpleMatchers/index.d.ts.map +1 -1
- package/dist/SimpleMatchers/index.js +16 -6
- package/dist/ViewMatchers/index.d.ts +2 -0
- package/dist/ViewMatchers/index.d.ts.map +1 -1
- package/dist/ViewMatchers/index.js +14 -4
- package/dist/contexts/MatchersInputLabelsContext.d.ts +3 -1
- package/dist/contexts/MatchersInputLabelsContext.d.ts.map +1 -1
- package/dist/contexts/MatchersInputLabelsContext.js +3 -3
- package/dist/contexts/SimpleMatchersLabelContext.d.ts +3 -1
- package/dist/contexts/SimpleMatchersLabelContext.d.ts.map +1 -1
- package/dist/contexts/SimpleMatchersLabelContext.js +2 -2
- package/package.json +2 -2
- package/src/MatchersInput/index.tsx +17 -4
- package/src/ProfileSelector/QueryControls.tsx +6 -0
- package/src/ProfileSelector/index.tsx +12 -2
- package/src/SimpleMatchers/index.tsx +20 -4
- package/src/ViewMatchers/index.tsx +17 -3
- package/src/contexts/MatchersInputLabelsContext.tsx +10 -2
- package/src/contexts/SimpleMatchersLabelContext.tsx +5 -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.19.14](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.13...@parca/profile@0.19.14) (2025-07-08)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
6
10
|
## [0.19.13](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.12...@parca/profile@0.19.13) (2025-07-03)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @parca/profile
|
|
@@ -7,6 +7,8 @@ interface MatchersInputProps {
|
|
|
7
7
|
runQuery: () => void;
|
|
8
8
|
currentQuery: Query;
|
|
9
9
|
profileType: string;
|
|
10
|
+
start?: number;
|
|
11
|
+
end?: number;
|
|
10
12
|
}
|
|
11
13
|
export interface ILabelNamesResult {
|
|
12
14
|
response?: LabelsResponse;
|
|
@@ -24,7 +26,7 @@ interface UseLabelValues {
|
|
|
24
26
|
};
|
|
25
27
|
loading: boolean;
|
|
26
28
|
}
|
|
27
|
-
export declare const useLabelValues: (client: QueryServiceClient, labelName: string, profileType: string) => UseLabelValues;
|
|
29
|
+
export declare const useLabelValues: (client: QueryServiceClient, labelName: string, profileType: string, start?: number, end?: number) => UseLabelValues;
|
|
28
30
|
export declare const useFetchUtilizationLabelValues: (labelName: string, utilizationLabels?: UtilizationLabels) => string[];
|
|
29
31
|
export default function MatchersInputWithProvider(props: MatchersInputProps): JSX.Element;
|
|
30
32
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/MatchersInput/index.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAgB,cAAc,EAAE,kBAAkB,EAAgB,MAAM,eAAe,CAAC;AAE/F,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AAGpC,OAAO,EAAC,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AAKrD,UAAU,kBAAkB;IAC1B,WAAW,EAAE,kBAAkB,CAAC;IAChC,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,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F,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,KAAK,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAWxF"}
|
|
@@ -24,7 +24,7 @@ import SuggestionsList, { Suggestion, Suggestions } from './SuggestionsList';
|
|
|
24
24
|
export const useLabelNames = (client, profileType, start, end, match) => {
|
|
25
25
|
const metadata = useGrpcMetadata();
|
|
26
26
|
const { data, isLoading, error } = useGrpcQuery({
|
|
27
|
-
key: ['labelNames', profileType, match?.join(',')],
|
|
27
|
+
key: ['labelNames', profileType, match?.join(','), start, end],
|
|
28
28
|
queryFn: async () => {
|
|
29
29
|
const request = { match: match !== undefined ? match : [] };
|
|
30
30
|
if (start !== undefined && end !== undefined) {
|
|
@@ -45,12 +45,16 @@ export const useLabelNames = (client, profileType, start, end, match) => {
|
|
|
45
45
|
});
|
|
46
46
|
return { result: { response: data, error: error }, loading: isLoading };
|
|
47
47
|
};
|
|
48
|
-
export const useLabelValues = (client, labelName, profileType) => {
|
|
48
|
+
export const useLabelValues = (client, labelName, profileType, start, end) => {
|
|
49
49
|
const metadata = useGrpcMetadata();
|
|
50
50
|
const { data, isLoading, error } = useGrpcQuery({
|
|
51
|
-
key: ['labelValues', labelName, profileType],
|
|
51
|
+
key: ['labelValues', labelName, profileType, start, end],
|
|
52
52
|
queryFn: async () => {
|
|
53
53
|
const request = { labelName, match: [], profileType };
|
|
54
|
+
if (start !== undefined && end !== undefined) {
|
|
55
|
+
request.start = millisToProtoTimestamp(start);
|
|
56
|
+
request.end = millisToProtoTimestamp(end);
|
|
57
|
+
}
|
|
54
58
|
const { response } = await client.values(request, { meta: metadata });
|
|
55
59
|
return sanitizeLabelValue(response.labelValues);
|
|
56
60
|
},
|
|
@@ -196,5 +200,5 @@ const MatchersInput = ({ setMatchersString, runQuery, currentQuery, }) => {
|
|
|
196
200
|
: 'filter profiles... eg. node="test"', id: "matchers-input" }), _jsx(SuggestionsList, { isLabelNamesLoading: isLabelNamesLoading, suggestions: suggestionSections, applySuggestion: applySuggestion, inputRef: inputRef.current, runQuery: runQuery, focusedInput: focusedInput, isLabelValuesLoading: isLabelValuesLoading && lastCompleted.type === 'literal', shouldTrimPrefix: shouldHandlePrefixes })] }));
|
|
197
201
|
};
|
|
198
202
|
export default function MatchersInputWithProvider(props) {
|
|
199
|
-
return (_jsx(LabelsProvider, { queryClient: props.queryClient, profileType: props.profileType, children: _jsx(MatchersInput, { ...props }) }));
|
|
203
|
+
return (_jsx(LabelsProvider, { queryClient: props.queryClient, profileType: props.profileType, start: props.start, end: props.end, children: _jsx(MatchersInput, { ...props }) }));
|
|
200
204
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryControls.d.ts","sourceRoot":"","sources":["../../src/ProfileSelector/QueryControls.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAC;AAClD,OAAe,EAAC,KAAK,cAAc,EAAC,MAAM,cAAc,CAAC;AAEzD,OAAO,EAAC,oBAAoB,EAAE,kBAAkB,EAAC,MAAM,eAAe,CAAC;AACvE,OAAO,EAAS,aAAa,EAAsB,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAC,WAAW,EAAE,KAAK,EAAC,MAAM,eAAe,CAAC;AAYjD,UAAU,kBAAkB;IAC1B,uBAAuB,EAAE,OAAO,CAAC;IACjC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,0BAA0B,EAAE,OAAO,CAAC;IACpC,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;IACxC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACnD,iBAAiB,CAAC,EAAE,QAAQ,CAAC;IAC7B,aAAa,CAAC,EAAE;QACd,2BAA2B,CAAC,EAAE,OAAO,CAAC;QACtC,0BAA0B,CAAC,EAAE,OAAO,CAAC;QACrC,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xD,iBAAiB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,kBAAkB,EAAE,CAAC,QAAQ,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,KAAK,EAAE,KAAK,CAAC;IACb,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IACjD,kBAAkB,EAAE,aAAa,CAAC;IAClC,qBAAqB,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACtD,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,kBAAkB,CAAC;IAChC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,qBAAqB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACjD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC1C,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,aAAa,CAAC,EAC5B,uBAAuB,EACvB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,2BAA2B,EAC3B,8BAA8B,EAC9B,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,EACL,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,cAAc,EACd,WAAW,EACX,MAAM,EACN,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,QAAQ,EACR,WAAW,EACX,iBAAiB,EACjB,iBAAiB,GAClB,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAyJlC"}
|
|
@@ -24,7 +24,7 @@ export function QueryControls({ showProfileTypeSelector, profileTypesData, profi
|
|
|
24
24
|
setQueryBrowserMode(advancedModeForQueryBrowser ? 'simple' : 'advanced');
|
|
25
25
|
}, className: `${advancedModeForQueryBrowser ? 'bg-indigo-600' : 'bg-gray-400 dark:bg-gray-800'} relative inline-flex h-[20px] w-[44px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white/75`, children: [_jsx("span", { className: "sr-only", children: "Use setting" }), _jsx("span", { "aria-hidden": "true", className: `${advancedModeForQueryBrowser ? 'translate-x-6' : 'translate-x-0'} pointer-events-none inline-block h-[16px] w-[16px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out` })] }), _jsx("label", { className: "text-xs", children: "Advanced Mode" })] }))] }), viewComponent?.createViewComponent] }), viewComponent?.disableExplorativeQuerying === true &&
|
|
26
26
|
viewComponent?.labelnames !== undefined &&
|
|
27
|
-
viewComponent?.labelnames.length >= 1 ? (_jsx(ViewMatchers, { labelNames: viewComponent.labelnames, setMatchersString: setMatchersString, profileType: selectedProfileName, runQuery: setQueryExpression, currentQuery: query, queryClient: queryClient })) : advancedModeForQueryBrowser ? (_jsx(MatchersInput, { setMatchersString: setMatchersString, runQuery: setQueryExpression, currentQuery: query, profileType: selectedProfileName, queryClient: queryClient })) : (_jsx(SimpleMatchers, { setMatchersString: setMatchersString, runQuery: setQueryExpression, currentQuery: query, profileType: selectedProfileName, queryBrowserRef: queryBrowserRef, queryClient: queryClient }, query.toString()))] }), showSumBySelector && (_jsxs("div", { children: [_jsx("div", { className: "mb-0.5 mt-1.5 flex items-center justify-between", children: _jsx("label", { className: "text-xs", children: "Sum by" }) }), _jsx(Select, { id: "h-sum-by-selector", defaultValue: [], isMulti: true, isClearable: false, name: "colors", options: labels.map(label => ({ label, value: label })), className: "parca-select-container text-sm w-full max-w-80", classNamePrefix: "parca-select", value: (sumBySelection ?? []).map(sumBy => ({ label: sumBy, value: sumBy })), onChange: newValue => {
|
|
27
|
+
viewComponent?.labelnames.length >= 1 ? (_jsx(ViewMatchers, { labelNames: viewComponent.labelnames, setMatchersString: setMatchersString, profileType: selectedProfileName, runQuery: setQueryExpression, currentQuery: query, queryClient: queryClient, start: timeRangeSelection.getFromMs(), end: timeRangeSelection.getToMs() })) : advancedModeForQueryBrowser ? (_jsx(MatchersInput, { setMatchersString: setMatchersString, runQuery: setQueryExpression, currentQuery: query, profileType: selectedProfileName, queryClient: queryClient, start: timeRangeSelection.getFromMs(), end: timeRangeSelection.getToMs() })) : (_jsx(SimpleMatchers, { setMatchersString: setMatchersString, runQuery: setQueryExpression, currentQuery: query, profileType: selectedProfileName, queryBrowserRef: queryBrowserRef, queryClient: queryClient, start: timeRangeSelection.getFromMs(), end: timeRangeSelection.getToMs() }, query.toString()))] }), showSumBySelector && (_jsxs("div", { children: [_jsx("div", { className: "mb-0.5 mt-1.5 flex items-center justify-between", children: _jsx("label", { className: "text-xs", children: "Sum by" }) }), _jsx(Select, { id: "h-sum-by-selector", defaultValue: [], isMulti: true, isClearable: false, name: "colors", options: labels.map(label => ({ label, value: label })), className: "parca-select-container text-sm w-full max-w-80", classNamePrefix: "parca-select", value: (sumBySelection ?? []).map(sumBy => ({ label: sumBy, value: sumBy })), onChange: newValue => {
|
|
28
28
|
setUserSumBySelection(newValue.map(option => option.value));
|
|
29
29
|
}, placeholder: "Labels...", styles: {
|
|
30
30
|
indicatorSeparator: () => ({ display: 'none' }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileSelector/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAC,QAAQ,EAAE,cAAc,EAAuC,MAAM,OAAO,CAAC;AAErF,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAC,oBAAoB,EAAE,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAUvE,OAAO,EAAC,KAAK,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAC,gBAAgB,EAAC,MAAM,IAAI,CAAC;AASpC,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACn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,IAAI,CAAC;IAClD,WAAW,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7C,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,gCAAgC,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,KAAK,CAAC;QACzB,IAAI,EAAE,MAAM,CAAC;QACb,iBAAiB,EAAE,MAAM,CAAC;QAC1B,IAAI,EAAE,kBAAkB,EAAE,CAAC;KAC5B,CAAC,CAAC;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,yBAAyB,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC,KAAK,IAAI,CAAC;CACnF;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,KAAK,CAAC,EAAE,QAAQ,CAAC;CAClB;AAED,eAAO,MAAM,eAAe,WAAY,kBAAkB,KAAG,mBAkB5D,CAAC;AAEF,QAAA,MAAM,eAAe,sWAmBlB,oBAAoB,KAAG,GAAG,CAAC,OA6N7B,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -53,8 +53,10 @@ const ProfileSelector = ({ queryClient, querySelection, selectProfile, selectQue
|
|
|
53
53
|
const selectedProfileType = useMemo(() => {
|
|
54
54
|
return Query.parse(querySelection.expression).profileType();
|
|
55
55
|
}, [querySelection.expression]);
|
|
56
|
-
const
|
|
57
|
-
const
|
|
56
|
+
const from = timeRangeSelection.getFromMs();
|
|
57
|
+
const to = timeRangeSelection.getToMs();
|
|
58
|
+
const { loading: labelNamesLoading, result } = useLabelNames(queryClient, profileType.toString(), from, to);
|
|
59
|
+
const { loading: selectedLabelNamesLoading, result: selectedLabelNamesResult } = useLabelNames(queryClient, selectedProfileType.toString(), from, to);
|
|
58
60
|
const labels = useMemo(() => {
|
|
59
61
|
return result.response?.labelNames === undefined ? [] : result.response.labelNames;
|
|
60
62
|
}, [result]);
|
|
@@ -8,6 +8,8 @@ interface Props {
|
|
|
8
8
|
currentQuery: Query;
|
|
9
9
|
profileType: string;
|
|
10
10
|
queryBrowserRef: React.RefObject<HTMLDivElement>;
|
|
11
|
+
start?: number;
|
|
12
|
+
end?: number;
|
|
11
13
|
}
|
|
12
14
|
export declare const transformLabelsForSelect: (labelNames: string[]) => SelectItem[];
|
|
13
15
|
export default function SimpleMathersWithProvider(props: Props): JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/SimpleMatchers/index.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AAKpC,OAAe,EAAC,KAAK,UAAU,EAAC,MAAM,UAAU,CAAC;AAEjD,UAAU,KAAK;IACb,WAAW,EAAE,kBAAkB,CAAC;IAChC,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,EAAE,KAAK,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/SimpleMatchers/index.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AAKpC,OAAe,EAAC,KAAK,UAAU,EAAC,MAAM,UAAU,CAAC;AAEjD,UAAU,KAAK;IACb,WAAW,EAAE,kBAAkB,CAAC;IAChC,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,EAAE,KAAK,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAoBD,eAAO,MAAM,wBAAwB,eAAgB,MAAM,EAAE,KAAG,UAAU,EAQzE,CAAC;AAoWF,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,KAAK,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAoB3E"}
|
|
@@ -16,7 +16,7 @@ import { Icon } from '@iconify/react';
|
|
|
16
16
|
import { useQueryClient } from '@tanstack/react-query';
|
|
17
17
|
import cx from 'classnames';
|
|
18
18
|
import { useGrpcMetadata } from '@parca/components';
|
|
19
|
-
import { sanitizeLabelValue } from '@parca/utilities';
|
|
19
|
+
import { millisToProtoTimestamp, sanitizeLabelValue } from '@parca/utilities';
|
|
20
20
|
import { LabelProvider, useLabels } from '../contexts/SimpleMatchersLabelContext';
|
|
21
21
|
import { useUtilizationLabels } from '../contexts/UtilizationLabelsContext';
|
|
22
22
|
import Select from './Select';
|
|
@@ -68,7 +68,7 @@ const operatorOptions = [
|
|
|
68
68
|
},
|
|
69
69
|
},
|
|
70
70
|
];
|
|
71
|
-
const SimpleMatchers = ({ queryClient, setMatchersString, currentQuery, profileType, queryBrowserRef, }) => {
|
|
71
|
+
const SimpleMatchers = ({ queryClient, setMatchersString, currentQuery, profileType, queryBrowserRef, start, end, }) => {
|
|
72
72
|
const utilizationLabels = useUtilizationLabels();
|
|
73
73
|
const [queryRows, setQueryRows] = useState([
|
|
74
74
|
{ labelName: '', operator: '=', labelValue: '', labelValues: [], isLoading: false },
|
|
@@ -85,8 +85,18 @@ const SimpleMatchers = ({ queryClient, setMatchersString, currentQuery, profileT
|
|
|
85
85
|
return [];
|
|
86
86
|
}
|
|
87
87
|
try {
|
|
88
|
-
const values = await reactQueryClient.fetchQuery([labelName, profileType], async () => {
|
|
89
|
-
const response = await queryClient.values({
|
|
88
|
+
const values = await reactQueryClient.fetchQuery([labelName, profileType, start, end], async () => {
|
|
89
|
+
const response = await queryClient.values({
|
|
90
|
+
labelName,
|
|
91
|
+
match: [],
|
|
92
|
+
profileType,
|
|
93
|
+
...(start !== undefined && end !== undefined
|
|
94
|
+
? {
|
|
95
|
+
start: millisToProtoTimestamp(start),
|
|
96
|
+
end: millisToProtoTimestamp(end),
|
|
97
|
+
}
|
|
98
|
+
: {}),
|
|
99
|
+
}, { meta: metadata }).response;
|
|
90
100
|
const sanitizedValues = sanitizeLabelValue(response.labelValues);
|
|
91
101
|
return sanitizedValues;
|
|
92
102
|
}, {
|
|
@@ -98,7 +108,7 @@ const SimpleMatchers = ({ queryClient, setMatchersString, currentQuery, profileT
|
|
|
98
108
|
console.error('Error fetching label values:', error);
|
|
99
109
|
return [];
|
|
100
110
|
}
|
|
101
|
-
}, [queryClient, metadata, profileType, reactQueryClient]);
|
|
111
|
+
}, [queryClient, metadata, profileType, reactQueryClient, start, end]);
|
|
102
112
|
const fetchLabelValuesUtilization = useCallback(async (labelName) => {
|
|
103
113
|
return (await utilizationLabels?.utilizationFetchLabelValues?.(labelName)) ?? [];
|
|
104
114
|
}, [utilizationLabels]);
|
|
@@ -242,5 +252,5 @@ export default function SimpleMathersWithProvider(props) {
|
|
|
242
252
|
const matchers = props.currentQuery.matchers;
|
|
243
253
|
return matchers.map(matcher => matcher.key);
|
|
244
254
|
}, [props.currentQuery]);
|
|
245
|
-
return (_jsx(LabelProvider, { queryClient: props.queryClient, profileType: props.profileType, labelNameFromMatchers: labelNameFromMatchers, children: _jsx(SimpleMatchers, { ...props }) }));
|
|
255
|
+
return (_jsx(LabelProvider, { queryClient: props.queryClient, profileType: props.profileType, labelNameFromMatchers: labelNameFromMatchers, start: props.start, end: props.end, children: _jsx(SimpleMatchers, { ...props }) }));
|
|
246
256
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ViewMatchers/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAKtE,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AAKpC,UAAU,KAAK;IACb,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,EAAE,KAAK,CAAC;IACpB,WAAW,EAAE,kBAAkB,CAAC;IAChC,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ViewMatchers/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAKtE,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AAKpC,UAAU,KAAK;IACb,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,EAAE,KAAK,CAAC;IACpB,WAAW,EAAE,kBAAkB,CAAC;IAChC,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAqKjC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -15,9 +15,9 @@ import { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
15
15
|
import { Icon } from '@iconify/react';
|
|
16
16
|
import cx from 'classnames';
|
|
17
17
|
import { useGrpcMetadata } from '@parca/components';
|
|
18
|
-
import { sanitizeLabelValue } from '@parca/utilities';
|
|
18
|
+
import { millisToProtoTimestamp, sanitizeLabelValue } from '@parca/utilities';
|
|
19
19
|
import CustomSelect from '../SimpleMatchers/Select';
|
|
20
|
-
const ViewMatchers = ({ labelNames, profileType, queryClient, runQuery, setMatchersString, currentQuery, }) => {
|
|
20
|
+
const ViewMatchers = ({ labelNames, profileType, queryClient, runQuery, setMatchersString, start, end, currentQuery, }) => {
|
|
21
21
|
const [labelValuesMap, setLabelValuesMap] = useState({});
|
|
22
22
|
const [isLoading, setIsLoading] = useState({});
|
|
23
23
|
const metadata = useGrpcMetadata();
|
|
@@ -45,14 +45,24 @@ const ViewMatchers = ({ labelNames, profileType, queryClient, runQuery, setMatch
|
|
|
45
45
|
}, [runQuery]);
|
|
46
46
|
const fetchLabelValues = useCallback(async (labelName) => {
|
|
47
47
|
try {
|
|
48
|
-
const response = await queryClient.values({
|
|
48
|
+
const response = await queryClient.values({
|
|
49
|
+
labelName,
|
|
50
|
+
match: [],
|
|
51
|
+
profileType,
|
|
52
|
+
...(start !== undefined && end !== undefined
|
|
53
|
+
? {
|
|
54
|
+
start: millisToProtoTimestamp(start),
|
|
55
|
+
end: millisToProtoTimestamp(end),
|
|
56
|
+
}
|
|
57
|
+
: {}),
|
|
58
|
+
}, { meta: metadata }).response;
|
|
49
59
|
return sanitizeLabelValue(response.labelValues);
|
|
50
60
|
}
|
|
51
61
|
catch (error) {
|
|
52
62
|
console.error('Error fetching label values:', error);
|
|
53
63
|
return [];
|
|
54
64
|
}
|
|
55
|
-
}, [queryClient, metadata, profileType]);
|
|
65
|
+
}, [queryClient, metadata, profileType, start, end]);
|
|
56
66
|
useEffect(() => {
|
|
57
67
|
const fetchAllLabelValues = async () => {
|
|
58
68
|
const newLabelValuesMap = {};
|
|
@@ -18,8 +18,10 @@ interface LabelsProviderProps {
|
|
|
18
18
|
children: React.ReactNode;
|
|
19
19
|
queryClient: QueryServiceClient;
|
|
20
20
|
profileType: string;
|
|
21
|
+
start?: number;
|
|
22
|
+
end?: number;
|
|
21
23
|
}
|
|
22
|
-
export declare function LabelsProvider({ children, queryClient, profileType, }: LabelsProviderProps): JSX.Element;
|
|
24
|
+
export declare function LabelsProvider({ children, queryClient, profileType, start, end, }: LabelsProviderProps): JSX.Element;
|
|
23
25
|
export declare function useLabels(): LabelsContextType;
|
|
24
26
|
export {};
|
|
25
27
|
//# sourceMappingURL=MatchersInputLabelsContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MatchersInputLabelsContext.d.ts","sourceRoot":"","sources":["../../src/contexts/MatchersInputLabelsContext.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAKjD,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,iBAAiB;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;IACtC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACnD,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAID,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,EAAE,kBAAkB,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"MatchersInputLabelsContext.d.ts","sourceRoot":"","sources":["../../src/contexts/MatchersInputLabelsContext.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAKjD,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,iBAAiB;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;IACtC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACnD,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAID,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,EAAE,kBAAkB,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAID,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,WAAW,EACX,WAAW,EACX,KAAK,EACL,GAAG,GACJ,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CA2EnC;AAED,wBAAgB,SAAS,IAAI,iBAAiB,CAM7C"}
|
|
@@ -17,10 +17,10 @@ import { useUtilizationLabels } from './UtilizationLabelsContext';
|
|
|
17
17
|
const LabelsContext = createContext(null);
|
|
18
18
|
// With there being the possibility of having utilization labels, we need to be able to determine whether the labels to be used are utilization labels or profiling data labels.
|
|
19
19
|
// This context is used to determine this.
|
|
20
|
-
export function LabelsProvider({ children, queryClient, profileType, }) {
|
|
20
|
+
export function LabelsProvider({ children, queryClient, profileType, start, end, }) {
|
|
21
21
|
const [currentLabelName, setCurrentLabelName] = React.useState(null);
|
|
22
22
|
const utilizationLabels = useUtilizationLabels();
|
|
23
|
-
const { result: labelNamesResponse, loading: isLabelNamesLoading } = useLabelNames(queryClient, profileType);
|
|
23
|
+
const { result: labelNamesResponse, loading: isLabelNamesLoading } = useLabelNames(queryClient, profileType, start, end);
|
|
24
24
|
const labelNamesFromAPI = useMemo(() => {
|
|
25
25
|
return (labelNamesResponse.error === undefined || labelNamesResponse.error == null) &&
|
|
26
26
|
labelNamesResponse !== undefined &&
|
|
@@ -28,7 +28,7 @@ export function LabelsProvider({ children, queryClient, profileType, }) {
|
|
|
28
28
|
? labelNamesResponse.response?.labelNames.filter(e => e !== '__name__') ?? []
|
|
29
29
|
: [];
|
|
30
30
|
}, [labelNamesResponse]);
|
|
31
|
-
const { result: labelValuesOriginal, loading: isLabelValuesLoading } = useLabelValues(queryClient, currentLabelName ?? '', profileType);
|
|
31
|
+
const { result: labelValuesOriginal, loading: isLabelValuesLoading } = useLabelValues(queryClient, currentLabelName ?? '', profileType, start, end);
|
|
32
32
|
const utilizationLabelValues = useFetchUtilizationLabelValues(currentLabelName ?? '', utilizationLabels);
|
|
33
33
|
const shouldHandlePrefixes = utilizationLabels?.utilizationLabelNames !== undefined;
|
|
34
34
|
const labelNameMappings = useMemo(() => {
|
|
@@ -14,8 +14,10 @@ interface LabelProviderProps {
|
|
|
14
14
|
queryClient: QueryServiceClient;
|
|
15
15
|
profileType: string;
|
|
16
16
|
labelNameFromMatchers: string[];
|
|
17
|
+
start?: number;
|
|
18
|
+
end?: number;
|
|
17
19
|
}
|
|
18
|
-
export declare function LabelProvider({ children, queryClient, profileType, labelNameFromMatchers, }: LabelProviderProps): JSX.Element;
|
|
20
|
+
export declare function LabelProvider({ children, queryClient, profileType, labelNameFromMatchers, start, end, }: LabelProviderProps): JSX.Element;
|
|
19
21
|
export declare function useLabels(): LabelContextValue;
|
|
20
22
|
export {};
|
|
21
23
|
//# sourceMappingURL=SimpleMatchersLabelContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleMatchersLabelContext.d.ts","sourceRoot":"","sources":["../../src/contexts/SimpleMatchersLabelContext.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAIjD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AAGzD,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB;AAED,UAAU,iBAAiB;IACzB,gBAAgB,EAAE,gBAAgB,EAAE,CAAC;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAID,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,EAAE,kBAAkB,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,qBAAqB,EAAE,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"SimpleMatchersLabelContext.d.ts","sourceRoot":"","sources":["../../src/contexts/SimpleMatchersLabelContext.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAIjD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AAGzD,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB;AAED,UAAU,iBAAiB;IACzB,gBAAgB,EAAE,gBAAgB,EAAE,CAAC;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAID,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,EAAE,kBAAkB,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAKD,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,WAAW,EACX,WAAW,EACX,qBAAqB,EACrB,KAAK,EACL,GAAG,GACJ,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAgFlC;AAED,wBAAgB,SAAS,IAAI,iBAAiB,CAM7C"}
|
|
@@ -18,9 +18,9 @@ import { useUtilizationLabels } from './UtilizationLabelsContext';
|
|
|
18
18
|
const LabelContext = createContext(null);
|
|
19
19
|
// With there being the possibility of having utilization labels, we need to be able to determine whether the labels to be used are utilization labels or profiling data labels.
|
|
20
20
|
// This context is used to determine this.
|
|
21
|
-
export function LabelProvider({ children, queryClient, profileType, labelNameFromMatchers, }) {
|
|
21
|
+
export function LabelProvider({ children, queryClient, profileType, labelNameFromMatchers, start, end, }) {
|
|
22
22
|
const utilizationLabelResponse = useUtilizationLabels();
|
|
23
|
-
const { loading, result } = useLabelNames(queryClient, profileType);
|
|
23
|
+
const { loading, result } = useLabelNames(queryClient, profileType, start, end);
|
|
24
24
|
const profileValues = useMemo(() => {
|
|
25
25
|
const profileLabelNames = result.error != null ? [] : result.response?.labelNames.filter(e => e !== '__name__') ?? [];
|
|
26
26
|
const uniqueProfileLabelNames = Array.from(new Set(profileLabelNames));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parca/profile",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.14",
|
|
4
4
|
"description": "Profile viewing libraries",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@floating-ui/react": "^0.27.12",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"access": "public",
|
|
79
79
|
"registry": "https://registry.npmjs.org/"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "2eea9d7d4d02cecf324386b49fa72fbf7529b15b"
|
|
82
82
|
}
|
|
@@ -33,6 +33,8 @@ interface MatchersInputProps {
|
|
|
33
33
|
runQuery: () => void;
|
|
34
34
|
currentQuery: Query;
|
|
35
35
|
profileType: string;
|
|
36
|
+
start?: number;
|
|
37
|
+
end?: number;
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
export interface ILabelNamesResult {
|
|
@@ -55,7 +57,7 @@ export const useLabelNames = (
|
|
|
55
57
|
const metadata = useGrpcMetadata();
|
|
56
58
|
|
|
57
59
|
const {data, isLoading, error} = useGrpcQuery<LabelsResponse>({
|
|
58
|
-
key: ['labelNames', profileType, match?.join(',')],
|
|
60
|
+
key: ['labelNames', profileType, match?.join(','), start, end],
|
|
59
61
|
queryFn: async () => {
|
|
60
62
|
const request: LabelsRequest = {match: match !== undefined ? match : []};
|
|
61
63
|
if (start !== undefined && end !== undefined) {
|
|
@@ -89,14 +91,20 @@ interface UseLabelValues {
|
|
|
89
91
|
export const useLabelValues = (
|
|
90
92
|
client: QueryServiceClient,
|
|
91
93
|
labelName: string,
|
|
92
|
-
profileType: string
|
|
94
|
+
profileType: string,
|
|
95
|
+
start?: number,
|
|
96
|
+
end?: number
|
|
93
97
|
): UseLabelValues => {
|
|
94
98
|
const metadata = useGrpcMetadata();
|
|
95
99
|
|
|
96
100
|
const {data, isLoading, error} = useGrpcQuery<string[]>({
|
|
97
|
-
key: ['labelValues', labelName, profileType],
|
|
101
|
+
key: ['labelValues', labelName, profileType, start, end],
|
|
98
102
|
queryFn: async () => {
|
|
99
103
|
const request: ValuesRequest = {labelName, match: [], profileType};
|
|
104
|
+
if (start !== undefined && end !== undefined) {
|
|
105
|
+
request.start = millisToProtoTimestamp(start);
|
|
106
|
+
request.end = millisToProtoTimestamp(end);
|
|
107
|
+
}
|
|
100
108
|
const {response} = await client.values(request, {meta: metadata});
|
|
101
109
|
return sanitizeLabelValue(response.labelValues);
|
|
102
110
|
},
|
|
@@ -321,7 +329,12 @@ const MatchersInput = ({
|
|
|
321
329
|
|
|
322
330
|
export default function MatchersInputWithProvider(props: MatchersInputProps): JSX.Element {
|
|
323
331
|
return (
|
|
324
|
-
<LabelsProvider
|
|
332
|
+
<LabelsProvider
|
|
333
|
+
queryClient={props.queryClient}
|
|
334
|
+
profileType={props.profileType}
|
|
335
|
+
start={props.start}
|
|
336
|
+
end={props.end}
|
|
337
|
+
>
|
|
325
338
|
<MatchersInput {...props} />
|
|
326
339
|
</LabelsProvider>
|
|
327
340
|
);
|
|
@@ -148,6 +148,8 @@ export function QueryControls({
|
|
|
148
148
|
runQuery={setQueryExpression}
|
|
149
149
|
currentQuery={query}
|
|
150
150
|
queryClient={queryClient}
|
|
151
|
+
start={timeRangeSelection.getFromMs()}
|
|
152
|
+
end={timeRangeSelection.getToMs()}
|
|
151
153
|
/>
|
|
152
154
|
) : advancedModeForQueryBrowser ? (
|
|
153
155
|
<MatchersInput
|
|
@@ -156,6 +158,8 @@ export function QueryControls({
|
|
|
156
158
|
currentQuery={query}
|
|
157
159
|
profileType={selectedProfileName}
|
|
158
160
|
queryClient={queryClient}
|
|
161
|
+
start={timeRangeSelection.getFromMs()}
|
|
162
|
+
end={timeRangeSelection.getToMs()}
|
|
159
163
|
/>
|
|
160
164
|
) : (
|
|
161
165
|
<SimpleMatchers
|
|
@@ -166,6 +170,8 @@ export function QueryControls({
|
|
|
166
170
|
profileType={selectedProfileName}
|
|
167
171
|
queryBrowserRef={queryBrowserRef}
|
|
168
172
|
queryClient={queryClient}
|
|
173
|
+
start={timeRangeSelection.getFromMs()}
|
|
174
|
+
end={timeRangeSelection.getToMs()}
|
|
169
175
|
/>
|
|
170
176
|
)}
|
|
171
177
|
</div>
|
|
@@ -170,10 +170,20 @@ const ProfileSelector = ({
|
|
|
170
170
|
return Query.parse(querySelection.expression).profileType();
|
|
171
171
|
}, [querySelection.expression]);
|
|
172
172
|
|
|
173
|
-
const
|
|
173
|
+
const from = timeRangeSelection.getFromMs();
|
|
174
|
+
const to = timeRangeSelection.getToMs();
|
|
175
|
+
|
|
176
|
+
const {loading: labelNamesLoading, result} = useLabelNames(
|
|
177
|
+
queryClient,
|
|
178
|
+
profileType.toString(),
|
|
179
|
+
from,
|
|
180
|
+
to
|
|
181
|
+
);
|
|
174
182
|
const {loading: selectedLabelNamesLoading, result: selectedLabelNamesResult} = useLabelNames(
|
|
175
183
|
queryClient,
|
|
176
|
-
selectedProfileType.toString()
|
|
184
|
+
selectedProfileType.toString(),
|
|
185
|
+
from,
|
|
186
|
+
to
|
|
177
187
|
);
|
|
178
188
|
|
|
179
189
|
const labels = useMemo(() => {
|
|
@@ -20,7 +20,7 @@ import cx from 'classnames';
|
|
|
20
20
|
import {QueryServiceClient} from '@parca/client';
|
|
21
21
|
import {useGrpcMetadata} from '@parca/components';
|
|
22
22
|
import {Query} from '@parca/parser';
|
|
23
|
-
import {sanitizeLabelValue} from '@parca/utilities';
|
|
23
|
+
import {millisToProtoTimestamp, sanitizeLabelValue} from '@parca/utilities';
|
|
24
24
|
|
|
25
25
|
import {LabelProvider, useLabels} from '../contexts/SimpleMatchersLabelContext';
|
|
26
26
|
import {useUtilizationLabels} from '../contexts/UtilizationLabelsContext';
|
|
@@ -33,6 +33,8 @@ interface Props {
|
|
|
33
33
|
currentQuery: Query;
|
|
34
34
|
profileType: string;
|
|
35
35
|
queryBrowserRef: React.RefObject<HTMLDivElement>;
|
|
36
|
+
start?: number;
|
|
37
|
+
end?: number;
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
interface QueryRow {
|
|
@@ -116,6 +118,8 @@ const SimpleMatchers = ({
|
|
|
116
118
|
currentQuery,
|
|
117
119
|
profileType,
|
|
118
120
|
queryBrowserRef,
|
|
121
|
+
start,
|
|
122
|
+
end,
|
|
119
123
|
}: Props): JSX.Element => {
|
|
120
124
|
const utilizationLabels = useUtilizationLabels();
|
|
121
125
|
const [queryRows, setQueryRows] = useState<QueryRow[]>([
|
|
@@ -140,10 +144,20 @@ const SimpleMatchers = ({
|
|
|
140
144
|
}
|
|
141
145
|
try {
|
|
142
146
|
const values = await reactQueryClient.fetchQuery(
|
|
143
|
-
[labelName, profileType],
|
|
147
|
+
[labelName, profileType, start, end],
|
|
144
148
|
async () => {
|
|
145
149
|
const response = await queryClient.values(
|
|
146
|
-
{
|
|
150
|
+
{
|
|
151
|
+
labelName,
|
|
152
|
+
match: [],
|
|
153
|
+
profileType,
|
|
154
|
+
...(start !== undefined && end !== undefined
|
|
155
|
+
? {
|
|
156
|
+
start: millisToProtoTimestamp(start),
|
|
157
|
+
end: millisToProtoTimestamp(end),
|
|
158
|
+
}
|
|
159
|
+
: {}),
|
|
160
|
+
},
|
|
147
161
|
{meta: metadata}
|
|
148
162
|
).response;
|
|
149
163
|
const sanitizedValues = sanitizeLabelValue(response.labelValues);
|
|
@@ -159,7 +173,7 @@ const SimpleMatchers = ({
|
|
|
159
173
|
return [];
|
|
160
174
|
}
|
|
161
175
|
},
|
|
162
|
-
[queryClient, metadata, profileType, reactQueryClient]
|
|
176
|
+
[queryClient, metadata, profileType, reactQueryClient, start, end]
|
|
163
177
|
);
|
|
164
178
|
|
|
165
179
|
const fetchLabelValuesUtilization = useCallback(
|
|
@@ -419,6 +433,8 @@ export default function SimpleMathersWithProvider(props: Props): JSX.Element {
|
|
|
419
433
|
queryClient={props.queryClient}
|
|
420
434
|
profileType={props.profileType}
|
|
421
435
|
labelNameFromMatchers={labelNameFromMatchers}
|
|
436
|
+
start={props.start}
|
|
437
|
+
end={props.end}
|
|
422
438
|
>
|
|
423
439
|
<SimpleMatchers {...props} />
|
|
424
440
|
</LabelProvider>
|
|
@@ -19,7 +19,7 @@ import cx from 'classnames';
|
|
|
19
19
|
import {QueryServiceClient} from '@parca/client';
|
|
20
20
|
import {useGrpcMetadata} from '@parca/components';
|
|
21
21
|
import {Query} from '@parca/parser';
|
|
22
|
-
import {sanitizeLabelValue} from '@parca/utilities';
|
|
22
|
+
import {millisToProtoTimestamp, sanitizeLabelValue} from '@parca/utilities';
|
|
23
23
|
|
|
24
24
|
import CustomSelect, {SelectItem} from '../SimpleMatchers/Select';
|
|
25
25
|
|
|
@@ -30,6 +30,8 @@ interface Props {
|
|
|
30
30
|
currentQuery: Query;
|
|
31
31
|
queryClient: QueryServiceClient;
|
|
32
32
|
setMatchersString: (arg: string) => void;
|
|
33
|
+
start?: number;
|
|
34
|
+
end?: number;
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
const ViewMatchers: React.FC<Props> = ({
|
|
@@ -38,6 +40,8 @@ const ViewMatchers: React.FC<Props> = ({
|
|
|
38
40
|
queryClient,
|
|
39
41
|
runQuery,
|
|
40
42
|
setMatchersString,
|
|
43
|
+
start,
|
|
44
|
+
end,
|
|
41
45
|
currentQuery,
|
|
42
46
|
}) => {
|
|
43
47
|
const [labelValuesMap, setLabelValuesMap] = useState<Record<string, string[]>>({});
|
|
@@ -77,7 +81,17 @@ const ViewMatchers: React.FC<Props> = ({
|
|
|
77
81
|
async (labelName: string): Promise<string[]> => {
|
|
78
82
|
try {
|
|
79
83
|
const response = await queryClient.values(
|
|
80
|
-
{
|
|
84
|
+
{
|
|
85
|
+
labelName,
|
|
86
|
+
match: [],
|
|
87
|
+
profileType,
|
|
88
|
+
...(start !== undefined && end !== undefined
|
|
89
|
+
? {
|
|
90
|
+
start: millisToProtoTimestamp(start),
|
|
91
|
+
end: millisToProtoTimestamp(end),
|
|
92
|
+
}
|
|
93
|
+
: {}),
|
|
94
|
+
},
|
|
81
95
|
{meta: metadata}
|
|
82
96
|
).response;
|
|
83
97
|
return sanitizeLabelValue(response.labelValues);
|
|
@@ -86,7 +100,7 @@ const ViewMatchers: React.FC<Props> = ({
|
|
|
86
100
|
return [];
|
|
87
101
|
}
|
|
88
102
|
},
|
|
89
|
-
[queryClient, metadata, profileType]
|
|
103
|
+
[queryClient, metadata, profileType, start, end]
|
|
90
104
|
);
|
|
91
105
|
|
|
92
106
|
useEffect(() => {
|
|
@@ -40,6 +40,8 @@ interface LabelsProviderProps {
|
|
|
40
40
|
children: React.ReactNode;
|
|
41
41
|
queryClient: QueryServiceClient;
|
|
42
42
|
profileType: string;
|
|
43
|
+
start?: number;
|
|
44
|
+
end?: number;
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
// With there being the possibility of having utilization labels, we need to be able to determine whether the labels to be used are utilization labels or profiling data labels.
|
|
@@ -48,13 +50,17 @@ export function LabelsProvider({
|
|
|
48
50
|
children,
|
|
49
51
|
queryClient,
|
|
50
52
|
profileType,
|
|
53
|
+
start,
|
|
54
|
+
end,
|
|
51
55
|
}: LabelsProviderProps): JSX.Element {
|
|
52
56
|
const [currentLabelName, setCurrentLabelName] = React.useState<string | null>(null);
|
|
53
57
|
const utilizationLabels = useUtilizationLabels();
|
|
54
58
|
|
|
55
59
|
const {result: labelNamesResponse, loading: isLabelNamesLoading} = useLabelNames(
|
|
56
60
|
queryClient,
|
|
57
|
-
profileType
|
|
61
|
+
profileType,
|
|
62
|
+
start,
|
|
63
|
+
end
|
|
58
64
|
);
|
|
59
65
|
|
|
60
66
|
const labelNamesFromAPI = useMemo(() => {
|
|
@@ -68,7 +74,9 @@ export function LabelsProvider({
|
|
|
68
74
|
const {result: labelValuesOriginal, loading: isLabelValuesLoading} = useLabelValues(
|
|
69
75
|
queryClient,
|
|
70
76
|
currentLabelName ?? '',
|
|
71
|
-
profileType
|
|
77
|
+
profileType,
|
|
78
|
+
start,
|
|
79
|
+
end
|
|
72
80
|
);
|
|
73
81
|
|
|
74
82
|
const utilizationLabelValues = useFetchUtilizationLabelValues(
|
|
@@ -38,6 +38,8 @@ interface LabelProviderProps {
|
|
|
38
38
|
queryClient: QueryServiceClient;
|
|
39
39
|
profileType: string;
|
|
40
40
|
labelNameFromMatchers: string[];
|
|
41
|
+
start?: number;
|
|
42
|
+
end?: number;
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
// With there being the possibility of having utilization labels, we need to be able to determine whether the labels to be used are utilization labels or profiling data labels.
|
|
@@ -48,9 +50,11 @@ export function LabelProvider({
|
|
|
48
50
|
queryClient,
|
|
49
51
|
profileType,
|
|
50
52
|
labelNameFromMatchers,
|
|
53
|
+
start,
|
|
54
|
+
end,
|
|
51
55
|
}: LabelProviderProps): JSX.Element {
|
|
52
56
|
const utilizationLabelResponse = useUtilizationLabels();
|
|
53
|
-
const {loading, result} = useLabelNames(queryClient, profileType);
|
|
57
|
+
const {loading, result} = useLabelNames(queryClient, profileType, start, end);
|
|
54
58
|
|
|
55
59
|
const profileValues = useMemo(() => {
|
|
56
60
|
const profileLabelNames =
|