@parca/profile 0.19.117 → 0.19.119

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.19.119](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.118...@parca/profile@0.19.119) (2026-02-12)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
10
+ ## [0.19.118](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.117...@parca/profile@0.19.118) (2026-02-11)
11
+
12
+ **Note:** Version bump only for package @parca/profile
13
+
6
14
  ## [0.19.117](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.116...@parca/profile@0.19.117) (2026-02-10)
7
15
 
8
16
  **Note:** Version bump only for package @parca/profile
@@ -25,7 +25,9 @@ interface MetricsGraphSectionProps {
25
25
  to: number;
26
26
  timeSelection: string;
27
27
  }, expression?: string) => void;
28
+ profileTypesLoading?: boolean;
29
+ hasNoProfileTypes?: boolean;
28
30
  }
29
- export declare function MetricsGraphSection({ showMetricsGraph, setDisplayHideMetricsGraphButton, heightStyle, querySelection, profileSelection, comparing, sumBy, defaultSumByLoading, queryClient, queryExpressionString, setTimeRangeSelection, selectQuery, setProfileSelection, query, setNewQueryExpression, commitDraft, }: MetricsGraphSectionProps): JSX.Element;
31
+ export declare function MetricsGraphSection({ showMetricsGraph, setDisplayHideMetricsGraphButton, heightStyle, querySelection, profileSelection, comparing, sumBy, defaultSumByLoading, queryClient, queryExpressionString, setTimeRangeSelection, selectQuery, setProfileSelection, query, setNewQueryExpression, commitDraft, profileTypesLoading, hasNoProfileTypes, }: MetricsGraphSectionProps): JSX.Element;
30
32
  export {};
31
33
  //# sourceMappingURL=MetricsGraphSection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MetricsGraphSection.d.ts","sourceRo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KAAK,IAAI,CAAC;IAC7C,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAChF,KAAK,EAAE,KAAK,CAAC;IACb,qBAAqB,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,kBAAkB,EAAE,CAAC,QAAQ,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,WAAW,EAAE,CACX,kBAAkB,CAAC,EAAE;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAC,EACtE,UAAU,CAAC,EAAE,MAAM,KAChB,IAAI,CAAC;IACV,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,wBAAgB,mBAAmB,CAAC,EAClC,gBAAgB,EAChB,gCAAgC,EAChC,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,mBAAmB,EACnB,WAAW,EACX,qBAAqB,EACrB,qBAAqB,EACrB,WAAW,EACX,mBAAmB,EACnB,KAAK,EACL,qBAAqB,EACrB,WAAW,EACX,mBAA2B,EAC3B,iBAAyB,GAC1B,EAAE,wBAAwB,GAAG,GAAG,CAAC,OAAO,CAiIxC"}
@@ -16,7 +16,7 @@ import { useURLStateBatch } from '@parca/components';
16
16
  import { Query } from '@parca/parser';
17
17
  import ProfileMetricsGraph, { ProfileMetricsEmptyState } from '../ProfileMetricsGraph';
18
18
  import { useResetStateOnSeriesChange } from '../ProfileView/hooks/useResetStateOnSeriesChange';
19
- export function MetricsGraphSection({ showMetricsGraph, setDisplayHideMetricsGraphButton, heightStyle, querySelection, profileSelection, comparing, sumBy, defaultSumByLoading, queryClient, queryExpressionString, setTimeRangeSelection, selectQuery, setProfileSelection, query, setNewQueryExpression, commitDraft, }) {
19
+ export function MetricsGraphSection({ showMetricsGraph, setDisplayHideMetricsGraphButton, heightStyle, querySelection, profileSelection, comparing, sumBy, defaultSumByLoading, queryClient, queryExpressionString, setTimeRangeSelection, selectQuery, setProfileSelection, query, setNewQueryExpression, commitDraft, profileTypesLoading = false, hasNoProfileTypes = false, }) {
20
20
  const resetStateOnSeriesChange = useResetStateOnSeriesChange();
21
21
  const batchUpdates = useURLStateBatch();
22
22
  const handleTimeRangeChange = (range) => {
@@ -84,5 +84,5 @@ export function MetricsGraphSection({ showMetricsGraph, setDisplayHideMetricsGra
84
84
  };
85
85
  return (_jsxs("div", { className: cx('relative', { 'py-4': !showMetricsGraph }), children: [setDisplayHideMetricsGraphButton != null ? (_jsxs("button", { onClick: () => setDisplayHideMetricsGraphButton(!showMetricsGraph), className: cx('hidden px-3 py-1 text-sm font-medium text-gray-700 dark:text-gray-200 bg-gray-100 rounded-md hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:bg-gray-900 z-[5]', showMetricsGraph && 'absolute right-0 bottom-3 !flex', !showMetricsGraph && 'relative !flex ml-auto'), children: [showMetricsGraph ? 'Hide' : 'Show', " Metrics Graph"] })) : null, showMetricsGraph && (_jsx(_Fragment, { children: _jsx("div", { style: { height: heightStyle }, children: (querySelection.expression !== '' || defaultSumByLoading) &&
86
86
  querySelection.from !== undefined &&
87
- querySelection.to !== undefined ? (_jsx(_Fragment, { children: _jsx(ProfileMetricsGraph, { queryClient: queryClient, queryExpression: querySelection.expression, from: querySelection.from, to: querySelection.to, profile: profileSelection, comparing: comparing, sumBy: sumBy ?? [], sumByLoading: defaultSumByLoading, setTimeRange: handleTimeRangeChange, addLabelMatcher: addLabelMatcher, onPointClick: handlePointClick }) })) : (profileSelection === null && (_jsx("div", { className: "p-2", children: _jsx(ProfileMetricsEmptyState, { message: "Please select a profile type and click 'Search' to begin." }) }))) }) }))] }));
87
+ querySelection.to !== undefined ? (_jsx(_Fragment, { children: _jsx(ProfileMetricsGraph, { queryClient: queryClient, queryExpression: querySelection.expression, from: querySelection.from, to: querySelection.to, profile: profileSelection, comparing: comparing, sumBy: sumBy ?? [], sumByLoading: defaultSumByLoading, setTimeRange: handleTimeRangeChange, addLabelMatcher: addLabelMatcher, onPointClick: handlePointClick }) })) : profileSelection === null && !profileTypesLoading ? (_jsx("div", { className: "p-2", children: hasNoProfileTypes ? (_jsx(ProfileMetricsEmptyState, { message: "No profiling data found in the selected time range. Try selecting a longer time range." })) : (_jsx(ProfileMetricsEmptyState, { message: "Please select a profile type and click 'Search' to begin." })) })) : null }) }))] }));
88
88
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileSelector/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAC,QAAQ,EAAE,cAAc,EAAoD,MAAM,OAAO,CAAC;AAElG,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAsB,oBAAoB,EAAE,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAY5F,OAAO,EAAyB,KAAK,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAgB/E,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,uBAAuB;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC;AAED,UAAU,oBAAqB,SAAQ,uBAAuB;IAC5D,WAAW,EAAE,kBAAkB,CAAC;IAChC,Y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AED,UAAU,uBAAuB;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC;AAED,UAAU,oBAAqB,SAAQ,uBAAuB;IAC5D,WAAW,EAAE,kBAAkB,CAAC;IAChC,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,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,IAAI,GAAG,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;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,GAC1B,QAAQ,kBAAkB,EAC1B,QAAQ,MAAM,EACd,MAAM,MAAM,KACX,mBAsBF,CAAC;AAEF,QAAA,MAAM,eAAe,GAAI,kMAYtB,oBAAoB,KAAG,GAAG,CAAC,OA+P7B,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -49,7 +49,7 @@ export const useProfileTypes = (client, start, end) => {
49
49
  };
50
50
  const ProfileSelector = ({ queryClient, closeProfile, enforcedProfileName, comparing, navigateTo, showMetricsGraph = true, showSumBySelector = true, showProfileTypeSelector = true, setDisplayHideMetricsGraphButton, suffix, onSearchHook, }) => {
51
51
  const { heightStyle } = useMetricsGraphDimensions(comparing, false);
52
- const { viewComponent } = useParcaContext();
52
+ const { viewComponent, additionalMetricsGraph } = useParcaContext();
53
53
  const [queryBrowserMode, setQueryBrowserMode] = useURLState('query_browser_mode');
54
54
  const batchUpdates = useURLStateBatch();
55
55
  const profileFilterDefaults = viewComponent?.profileFilterDefaults;
@@ -161,7 +161,8 @@ const ProfileSelector = ({ queryClient, closeProfile, enforcedProfileName, compa
161
161
  queryExpressionString === '{}';
162
162
  const queryBrowserRef = useRef(null);
163
163
  const sumByRef = useRef(null);
164
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "mb-2 flex", children: [_jsx(LabelsQueryProvider, { setMatchersString: setMatchersString, runQuery: setQueryExpression, currentQuery: query, profileType: selectedProfileName ?? profileType.toString(), queryClient: queryClient, start: timeRangeSelection.getFromMs(), end: timeRangeSelection.getToMs(), suffix: suffix, children: _jsx(LabelsSource, { children: _jsx(QueryControls, { showProfileTypeSelector: showProfileTypeSelector, showSumBySelector: showSumBySelector, profileTypesData: profileTypesData, profileTypesLoading: profileTypesLoading, selectedProfileName: selectedProfileName, setProfileName: setProfileName, setMatchersString: setMatchersString, setQueryExpression: setQueryExpression, query: query, queryBrowserRef: queryBrowserRef, timeRangeSelection: timeRangeSelection, setTimeRangeSelection: handleTimeRangeChange, searchDisabled: searchDisabled, setQueryBrowserMode: setQueryBrowserMode, advancedModeForQueryBrowser: advancedModeForQueryBrowser, setAdvancedModeForQueryBrowser: setAdvancedModeForQueryBrowser, queryClient: queryClient, sumByRef: sumByRef, labels: labels, sumBySelection: draftSelection.sumBy ?? [], sumBySelectionLoading: sumByLoading, setUserSumBySelection: setDraftSumBy, profileType: profileType, profileTypesError: error, viewComponent: viewComponent, draftSelection: draftSelection, setDraftMatchers: setDraftMatchers, draftParsedQuery: draftParsedQuery, commitDraft: commitDraft }) }) }), comparing && (_jsx("div", { children: _jsx(IconButton, { onClick: () => closeProfile(), icon: _jsx(CloseIcon, {}), ...testId(TEST_IDS.COMPARE_CLOSE_BUTTON) }) }))] }), _jsx(MetricsGraphSection, { showMetricsGraph: showMetricsGraph, setDisplayHideMetricsGraphButton: setDisplayHideMetricsGraphButton, heightStyle: heightStyle, querySelection: querySelection, profileSelection: profileSelection, comparing: comparing, sumBy: querySelection.sumBy, defaultSumByLoading: sumByLoading, queryClient: queryClient, queryExpressionString: queryExpressionString, setTimeRangeSelection: handleTimeRangeChange, selectQuery: commitDraft, setProfileSelection: setProfileSelection, query: query, setQueryExpression: setQueryExpression, setNewQueryExpression: setDraftExpression, commitDraft: commitDraft })] }));
164
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "mb-2 flex flex-col", children: [additionalMetricsGraph?.({ querySelection, queryClient, suffix }), _jsx(LabelsQueryProvider, { setMatchersString: setMatchersString, runQuery: setQueryExpression, currentQuery: query, profileType: selectedProfileName ?? profileType.toString(), queryClient: queryClient, start: timeRangeSelection.getFromMs(), end: timeRangeSelection.getToMs(), suffix: suffix, children: _jsx(LabelsSource, { children: _jsx(QueryControls, { showProfileTypeSelector: showProfileTypeSelector, showSumBySelector: showSumBySelector, profileTypesData: profileTypesData, profileTypesLoading: profileTypesLoading, selectedProfileName: selectedProfileName, setProfileName: setProfileName, setMatchersString: setMatchersString, setQueryExpression: setQueryExpression, query: query, queryBrowserRef: queryBrowserRef, timeRangeSelection: timeRangeSelection, setTimeRangeSelection: handleTimeRangeChange, searchDisabled: searchDisabled, setQueryBrowserMode: setQueryBrowserMode, advancedModeForQueryBrowser: advancedModeForQueryBrowser, setAdvancedModeForQueryBrowser: setAdvancedModeForQueryBrowser, queryClient: queryClient, sumByRef: sumByRef, labels: labels, sumBySelection: draftSelection.sumBy ?? [], sumBySelectionLoading: sumByLoading, setUserSumBySelection: setDraftSumBy, profileType: profileType, profileTypesError: error, viewComponent: viewComponent, draftSelection: draftSelection, setDraftMatchers: setDraftMatchers, draftParsedQuery: draftParsedQuery, commitDraft: commitDraft }) }) }), comparing && (_jsx("div", { children: _jsx(IconButton, { onClick: () => closeProfile(), icon: _jsx(CloseIcon, {}), ...testId(TEST_IDS.COMPARE_CLOSE_BUTTON) }) }))] }), _jsx(MetricsGraphSection, { showMetricsGraph: showMetricsGraph, setDisplayHideMetricsGraphButton: setDisplayHideMetricsGraphButton, heightStyle: heightStyle, querySelection: querySelection, profileSelection: profileSelection, comparing: comparing, sumBy: querySelection.sumBy, defaultSumByLoading: sumByLoading, queryClient: queryClient, queryExpressionString: queryExpressionString, setTimeRangeSelection: handleTimeRangeChange, selectQuery: commitDraft, setProfileSelection: setProfileSelection, query: query, setQueryExpression: setQueryExpression, setNewQueryExpression: setDraftExpression, commitDraft: commitDraft, profileTypesLoading: profileTypesLoading, hasNoProfileTypes: !profileTypesLoading &&
165
+ (profileTypesData?.types == null || profileTypesData.types.length === 0) })] }));
165
166
  };
166
167
  export default ProfileSelector;
167
168
  const LabelsSource = ({ children }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"useLabels.d.ts","sourceRoot":"","sources":["../../src/hooks/useLabels.ts"],"names":[],"mappings":"AAaA,OAAO,EAAgB,cAAc,EAAE,kBAAkB,EAAgB,MAAM,eAAe,CAAC;AAM/F,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,UAAU,cAAc;IACtB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,UAAU,aAAa;IACrB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED,eAAO,MAAM,aAAa,GACxB,QAAQ,kBAAkB,EAC1B,aAAa,MAAM,EACnB,QAAQ,MAAM,EACd,MAAM,MAAM,EACZ,QAAQ,MAAM,EAAE,KACf,aA8BF,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,QAAQ,kBAAkB,EAC1B,WAAW,MAAM,EACjB,aAAa,MAAM,EACnB,QAAQ,MAAM,EACd,MAAM,MAAM,KACX,cA+BF,CAAC"}
1
+ {"version":3,"file":"useLabels.d.ts","sourceRoot":"","sources":["../../src/hooks/useLabels.ts"],"names":[],"mappings":"AAaA,OAAO,EAAgB,cAAc,EAAE,kBAAkB,EAAgB,MAAM,eAAe,CAAC;AAM/F,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,UAAU,cAAc;IACtB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,UAAU,aAAa;IACrB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED,eAAO,MAAM,aAAa,GACxB,QAAQ,kBAAkB,EAC1B,aAAa,MAAM,EACnB,QAAQ,MAAM,EACd,MAAM,MAAM,EACZ,QAAQ,MAAM,EAAE,KACf,aA+BF,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,QAAQ,kBAAkB,EAC1B,WAAW,MAAM,EACjB,aAAa,MAAM,EACnB,QAAQ,MAAM,EACd,MAAM,MAAM,KACX,cA+BF,CAAC"}
@@ -15,6 +15,7 @@ import { millisToProtoTimestamp, sanitizeLabelValue } from '@parca/utilities';
15
15
  import useGrpcQuery from '../useGrpcQuery';
16
16
  export const useLabelNames = (client, profileType, start, end, match) => {
17
17
  const metadata = useGrpcMetadata();
18
+ const enabled = profileType !== undefined && profileType !== '';
18
19
  const { data, isLoading, error, refetch } = useGrpcQuery({
19
20
  key: ['labelNames', profileType, match?.join(','), start, end],
20
21
  queryFn: async (signal) => {
@@ -30,13 +31,13 @@ export const useLabelNames = (client, profileType, start, end, match) => {
30
31
  return response;
31
32
  },
32
33
  options: {
33
- enabled: profileType !== undefined && profileType !== '',
34
+ enabled,
34
35
  keepPreviousData: false,
35
36
  },
36
37
  });
37
38
  return {
38
39
  result: { response: data, error: error },
39
- loading: isLoading,
40
+ loading: enabled && isLoading,
40
41
  refetch: async () => {
41
42
  await refetch();
42
43
  },
package/dist/index.d.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  import type { ParamPreferences } from '@parca/components';
2
+ import MatchersInput from './MatchersInput';
2
3
  import MetricsGraph, { type ContextMenuItemOrSubmenu, type Series } from './MetricsGraph';
3
4
  import ProfileExplorer from './ProfileExplorer';
4
5
  import ProfileTypeSelector from './ProfileTypeSelector';
5
6
  import { SelectWithRefresh } from './SelectWithRefresh';
7
+ import SimpleMatchers from './SimpleMatchers';
6
8
  import CustomSelect from './SimpleMatchers/Select';
7
9
  import { LabelsQueryProvider, useLabelsQueryProvider, type LabelsQueryProviderContextType } from './contexts/LabelsQueryProvider';
8
10
  import { UnifiedLabelsProvider, useUnifiedLabels } from './contexts/UnifiedLabelsContext';
@@ -25,5 +27,5 @@ export { default as ProfileFilters } from './ProfileView/components/ProfileFilte
25
27
  export { useProfileFiltersUrlState } from './ProfileView/components/ProfileFilters/useProfileFiltersUrlState';
26
28
  export declare const DEFAULT_PROFILE_EXPLORER_PARAM_VALUES: ParamPreferences;
27
29
  export { useProfileTypes } from './ProfileSelector';
28
- export { ProfileExplorer, ProfileTypeSelector, CustomSelect, SelectWithRefresh, useLabelNames, MetricsGraph, type ContextMenuItemOrSubmenu, type Series, LabelsQueryProvider, useLabelsQueryProvider, UnifiedLabelsProvider, useUnifiedLabels, useQueryState, type LabelsQueryProviderContextType, };
30
+ export { ProfileExplorer, ProfileTypeSelector, CustomSelect, SelectWithRefresh, useLabelNames, MetricsGraph, SimpleMatchers, MatchersInput, type ContextMenuItemOrSubmenu, type Series, LabelsQueryProvider, useLabelsQueryProvider, UnifiedLabelsProvider, useUnifiedLabels, useQueryState, type LabelsQueryProviderContextType, };
29
31
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAExD,OAAO,YAAY,EAAE,EAAC,KAAK,wBAAwB,EAAE,KAAK,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACxF,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,KAAK,8BAA8B,EACpC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAC,qBAAqB,EAAE,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AACxF,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAOpD,OAAO,EAAC,yBAAyB,EAAC,MAAM,0CAA0C,CAAC;AAEnF,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,KAAK,aAAa,GACnB,MAAM,2DAA2D,CAAC;AACnE,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,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;AAOpD,OAAO,EAAC,yBAAyB,EAAC,MAAM,0CAA0C,CAAC;AAEnF,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,KAAK,aAAa,GACnB,MAAM,2DAA2D,CAAC;AACnE,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAC,yBAAyB,EAAC,MAAM,mEAAmE,CAAC;AAE5G,eAAO,MAAM,qCAAqC,EAAE,gBAWnD,CAAC;AAEF,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,cAAc,EACd,aAAa,EACb,KAAK,wBAAwB,EAC7B,KAAK,MAAM,EACX,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,KAAK,8BAA8B,GACpC,CAAC"}
package/dist/index.js CHANGED
@@ -12,10 +12,12 @@
12
12
  // limitations under the License.
13
13
  import { CompressionType, setCompressionCodec } from '@uwdata/flechette';
14
14
  import * as lz4 from 'lz4js';
15
+ import MatchersInput from './MatchersInput';
15
16
  import MetricsGraph from './MetricsGraph';
16
17
  import ProfileExplorer from './ProfileExplorer';
17
18
  import ProfileTypeSelector from './ProfileTypeSelector';
18
19
  import { SelectWithRefresh } from './SelectWithRefresh';
20
+ import SimpleMatchers from './SimpleMatchers';
19
21
  import CustomSelect from './SimpleMatchers/Select';
20
22
  import { LabelsQueryProvider, useLabelsQueryProvider, } from './contexts/LabelsQueryProvider';
21
23
  import { UnifiedLabelsProvider, useUnifiedLabels } from './contexts/UnifiedLabelsContext';
@@ -53,4 +55,4 @@ export const DEFAULT_PROFILE_EXPLORER_PARAM_VALUES = {
53
55
  },
54
56
  };
55
57
  export { useProfileTypes } from './ProfileSelector';
56
- export { ProfileExplorer, ProfileTypeSelector, CustomSelect, SelectWithRefresh, useLabelNames, MetricsGraph, LabelsQueryProvider, useLabelsQueryProvider, UnifiedLabelsProvider, useUnifiedLabels, useQueryState, };
58
+ export { ProfileExplorer, ProfileTypeSelector, CustomSelect, SelectWithRefresh, useLabelNames, MetricsGraph, SimpleMatchers, MatchersInput, LabelsQueryProvider, useLabelsQueryProvider, UnifiedLabelsProvider, useUnifiedLabels, useQueryState, };
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.19.117",
3
+ "version": "0.19.119",
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.17",
10
- "@parca/components": "0.16.397",
10
+ "@parca/components": "0.16.398",
11
11
  "@parca/dynamicsize": "0.16.72",
12
- "@parca/hooks": "0.0.117",
12
+ "@parca/hooks": "0.0.118",
13
13
  "@parca/icons": "0.16.79",
14
14
  "@parca/parser": "0.16.86",
15
- "@parca/store": "0.16.200",
15
+ "@parca/store": "0.16.201",
16
16
  "@parca/test-utils": "0.0.20",
17
- "@parca/utilities": "0.0.123",
17
+ "@parca/utilities": "0.0.124",
18
18
  "@popperjs/core": "^2.11.8",
19
19
  "@protobuf-ts/runtime-rpc": "^2.5.0",
20
20
  "@storybook/preview-api": "^8.4.3",
@@ -87,5 +87,5 @@
87
87
  "access": "public",
88
88
  "registry": "https://registry.npmjs.org/"
89
89
  },
90
- "gitHead": "532b9bcc1fc7027c349a302c89fe35cdc890f755"
90
+ "gitHead": "c298aa10abd0b4045d622915304d852bb3237b96"
91
91
  }
@@ -43,6 +43,8 @@ interface MetricsGraphSectionProps {
43
43
  refreshedTimeRange?: {from: number; to: number; timeSelection: string},
44
44
  expression?: string
45
45
  ) => void;
46
+ profileTypesLoading?: boolean;
47
+ hasNoProfileTypes?: boolean;
46
48
  }
47
49
 
48
50
  export function MetricsGraphSection({
@@ -62,6 +64,8 @@ export function MetricsGraphSection({
62
64
  query,
63
65
  setNewQueryExpression,
64
66
  commitDraft,
67
+ profileTypesLoading = false,
68
+ hasNoProfileTypes = false,
65
69
  }: MetricsGraphSectionProps): JSX.Element {
66
70
  const resetStateOnSeriesChange = useResetStateOnSeriesChange();
67
71
  const batchUpdates = useURLStateBatch();
@@ -177,13 +181,15 @@ export function MetricsGraphSection({
177
181
  onPointClick={handlePointClick}
178
182
  />
179
183
  </>
180
- ) : (
181
- profileSelection === null && (
182
- <div className="p-2">
184
+ ) : profileSelection === null && !profileTypesLoading ? (
185
+ <div className="p-2">
186
+ {hasNoProfileTypes ? (
187
+ <ProfileMetricsEmptyState message="No profiling data found in the selected time range. Try selecting a longer time range." />
188
+ ) : (
183
189
  <ProfileMetricsEmptyState message="Please select a profile type and click 'Search' to begin." />
184
- </div>
185
- )
186
- )}
190
+ )}
191
+ </div>
192
+ ) : null}
187
193
  </div>
188
194
  </>
189
195
  )}
@@ -119,7 +119,7 @@ const ProfileSelector = ({
119
119
  onSearchHook,
120
120
  }: ProfileSelectorProps): JSX.Element => {
121
121
  const {heightStyle} = useMetricsGraphDimensions(comparing, false);
122
- const {viewComponent} = useParcaContext();
122
+ const {viewComponent, additionalMetricsGraph} = useParcaContext();
123
123
  const [queryBrowserMode, setQueryBrowserMode] = useURLState('query_browser_mode');
124
124
  const batchUpdates = useURLStateBatch();
125
125
 
@@ -290,7 +290,8 @@ const ProfileSelector = ({
290
290
 
291
291
  return (
292
292
  <>
293
- <div className="mb-2 flex">
293
+ <div className="mb-2 flex flex-col">
294
+ {additionalMetricsGraph?.({querySelection, queryClient, suffix})}
294
295
  <LabelsQueryProvider
295
296
  setMatchersString={setMatchersString}
296
297
  runQuery={setQueryExpression}
@@ -363,6 +364,11 @@ const ProfileSelector = ({
363
364
  setQueryExpression={setQueryExpression}
364
365
  setNewQueryExpression={setDraftExpression}
365
366
  commitDraft={commitDraft}
367
+ profileTypesLoading={profileTypesLoading}
368
+ hasNoProfileTypes={
369
+ !profileTypesLoading &&
370
+ (profileTypesData?.types == null || profileTypesData.types.length === 0)
371
+ }
366
372
  />
367
373
  </>
368
374
  );
@@ -47,6 +47,7 @@ export const useLabelNames = (
47
47
  match?: string[]
48
48
  ): UseLabelNames => {
49
49
  const metadata = useGrpcMetadata();
50
+ const enabled = profileType !== undefined && profileType !== '';
50
51
 
51
52
  const {data, isLoading, error, refetch} = useGrpcQuery<LabelsResponse>({
52
53
  key: ['labelNames', profileType, match?.join(','), start, end],
@@ -63,14 +64,14 @@ export const useLabelNames = (
63
64
  return response;
64
65
  },
65
66
  options: {
66
- enabled: profileType !== undefined && profileType !== '',
67
+ enabled,
67
68
  keepPreviousData: false,
68
69
  },
69
70
  });
70
71
 
71
72
  return {
72
73
  result: {response: data, error: error as Error},
73
- loading: isLoading,
74
+ loading: enabled && isLoading,
74
75
  refetch: async () => {
75
76
  await refetch();
76
77
  },
package/src/index.tsx CHANGED
@@ -16,10 +16,12 @@ import * as lz4 from 'lz4js';
16
16
 
17
17
  import type {ParamPreferences} from '@parca/components';
18
18
 
19
+ import MatchersInput from './MatchersInput';
19
20
  import MetricsGraph, {type ContextMenuItemOrSubmenu, type Series} from './MetricsGraph';
20
21
  import ProfileExplorer from './ProfileExplorer';
21
22
  import ProfileTypeSelector from './ProfileTypeSelector';
22
23
  import {SelectWithRefresh} from './SelectWithRefresh';
24
+ import SimpleMatchers from './SimpleMatchers';
23
25
  import CustomSelect from './SimpleMatchers/Select';
24
26
  import {
25
27
  LabelsQueryProvider,
@@ -80,6 +82,8 @@ export {
80
82
  SelectWithRefresh,
81
83
  useLabelNames,
82
84
  MetricsGraph,
85
+ SimpleMatchers,
86
+ MatchersInput,
83
87
  type ContextMenuItemOrSubmenu,
84
88
  type Series,
85
89
  LabelsQueryProvider,