@parca/profile 0.19.116 → 0.19.118

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.118](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.117...@parca/profile@0.19.118) (2026-02-11)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
10
+ ## [0.19.117](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.116...@parca/profile@0.19.117) (2026-02-10)
11
+
12
+ **Note:** Version bump only for package @parca/profile
13
+
6
14
  ## [0.19.116](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.115...@parca/profile@0.19.116) (2026-02-09)
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,OA8P7B,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -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", 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, 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
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,E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C7B,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,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
@@ -10,6 +10,8 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
+ import { CompressionType, setCompressionCodec } from '@uwdata/flechette';
14
+ import * as lz4 from 'lz4js';
13
15
  import MetricsGraph from './MetricsGraph';
14
16
  import ProfileExplorer from './ProfileExplorer';
15
17
  import ProfileTypeSelector from './ProfileTypeSelector';
@@ -19,6 +21,10 @@ import { LabelsQueryProvider, useLabelsQueryProvider, } from './contexts/LabelsQ
19
21
  import { UnifiedLabelsProvider, useUnifiedLabels } from './contexts/UnifiedLabelsContext';
20
22
  import { useLabelNames } from './hooks/useLabels';
21
23
  import { useQueryState } from './hooks/useQueryState';
24
+ setCompressionCodec(CompressionType.LZ4_FRAME, {
25
+ encode: (data) => lz4.compress(data),
26
+ decode: (data) => lz4.decompress(data),
27
+ });
22
28
  export { useMetricsGraphDimensions } from './MetricsGraph/useMetricsGraphDimensions';
23
29
  export * from './ProfileFlameChart';
24
30
  export * from './ProfileFlameGraph';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.19.116",
3
+ "version": "0.19.118",
4
4
  "description": "Profile viewing libraries",
5
5
  "dependencies": {
6
6
  "@floating-ui/react": "^0.27.12",
@@ -40,6 +40,7 @@
40
40
  "framer-motion": "6.5.1",
41
41
  "graphviz-wasm": "3.0.2",
42
42
  "lodash.throttle": "^4.1.1",
43
+ "lz4js": "^0.2.0",
43
44
  "react": "18.3.1",
44
45
  "react-beautiful-dnd": "^13.1.1",
45
46
  "react-contexify": "^6.0.0",
@@ -62,6 +63,7 @@
62
63
  },
63
64
  "devDependencies": {
64
65
  "@types/lodash.throttle": "4.1.9",
66
+ "@types/lz4js": "^0.2.1",
65
67
  "@types/react-syntax-highlighter": "15.5.13"
66
68
  },
67
69
  "main": "dist/index.js",
@@ -85,5 +87,5 @@
85
87
  "access": "public",
86
88
  "registry": "https://registry.npmjs.org/"
87
89
  },
88
- "gitHead": "f4ec1362c1c0e27bf2fdb48b35436660f35a298b"
90
+ "gitHead": "b06df60fc561443a763dfe6f85ebc1acb620daac"
89
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
  )}
@@ -363,6 +363,11 @@ const ProfileSelector = ({
363
363
  setQueryExpression={setQueryExpression}
364
364
  setNewQueryExpression={setDraftExpression}
365
365
  commitDraft={commitDraft}
366
+ profileTypesLoading={profileTypesLoading}
367
+ hasNoProfileTypes={
368
+ !profileTypesLoading &&
369
+ (profileTypesData?.types == null || profileTypesData.types.length === 0)
370
+ }
366
371
  />
367
372
  </>
368
373
  );
@@ -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
@@ -11,6 +11,9 @@
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
13
 
14
+ import {CompressionType, setCompressionCodec} from '@uwdata/flechette';
15
+ import * as lz4 from 'lz4js';
16
+
14
17
  import type {ParamPreferences} from '@parca/components';
15
18
 
16
19
  import MetricsGraph, {type ContextMenuItemOrSubmenu, type Series} from './MetricsGraph';
@@ -27,6 +30,11 @@ import {UnifiedLabelsProvider, useUnifiedLabels} from './contexts/UnifiedLabelsC
27
30
  import {useLabelNames} from './hooks/useLabels';
28
31
  import {useQueryState} from './hooks/useQueryState';
29
32
 
33
+ setCompressionCodec(CompressionType.LZ4_FRAME, {
34
+ encode: (data: Uint8Array) => lz4.compress(data),
35
+ decode: (data: Uint8Array) => lz4.decompress(data),
36
+ });
37
+
30
38
  export {useMetricsGraphDimensions} from './MetricsGraph/useMetricsGraphDimensions';
31
39
 
32
40
  export * from './ProfileFlameChart';