@parca/profile 0.19.104 → 0.19.107

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,18 @@
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.107](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.106...@parca/profile@0.19.107) (2025-12-22)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
10
+ ## [0.19.106](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.105...@parca/profile@0.19.106) (2025-12-18)
11
+
12
+ **Note:** Version bump only for package @parca/profile
13
+
14
+ ## [0.19.105](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.104...@parca/profile@0.19.105) (2025-12-18)
15
+
16
+ **Note:** Version bump only for package @parca/profile
17
+
6
18
  ## [0.19.104](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.103...@parca/profile@0.19.104) (2025-12-17)
7
19
 
8
20
  **Note:** Version bump only for package @parca/profile
@@ -87,7 +87,7 @@ export const useVisibleNodes = ({ table, viewport, total, width, selectedRow, ef
87
87
  renderedRangeRef.current = {
88
88
  minDepth: Infinity,
89
89
  maxDepth: -Infinity,
90
- table: table,
90
+ table,
91
91
  };
92
92
  }
93
93
  // Expand the rendered range (never shrink when scrolling up/down)
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileMetricsGraph/index.tsx"],"names":[],"mappings":"AAkBA,OAAO,EACL,KAAK,EAGL,kBAAkB,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,aAAa,EAId,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAAyB,gBAAgB,EAAC,MAAM,IAAI,CAAC;AA6G5D,UAAU,6BAA6B;IACrC,OAAO,EAAE,MAAM,CAAC;CACjB;AAaD,eAAO,MAAM,wBAAwB,GAAI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CAAC;AAEF,UAAU,wBAAwB;IAChC,WAAW,EAAE,kBAAkB,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,YAAY,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC7C,eAAe,EAAE,CACf,MAAM,EAAE;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,GAAG,KAAK,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC,KACvE,IAAI,CAAC;IACV,YAAY,EAAE,CACZ,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,KAAK,EAAE,EACf,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,MAAM,KACb,IAAI,CAAC;IACV,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,mBAAmB,GAAI,qHAW1B,wBAAwB,KAAG,GAAG,CAAC,OA0VjC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -245,7 +245,7 @@ const ProfileMetricsGraph = ({ queryClient, queryExpression, profile, from, to,
245
245
  }
246
246
  return _jsx(ErrorContent, { errorMessage: capitalizeOnlyFirstLetter(error.message) });
247
247
  }
248
- return (_jsx(AnimatePresence, { children: _jsxs(motion.div, { className: "h-full w-full relative", initial: { display: 'none', opacity: 0 }, animate: { display: 'block', opacity: 1 }, transition: { duration: 0.5 }, children: [isTrimmed ? (_jsxs("div", { className: "flex justify-center items-center gap-2", children: [_jsxs("span", { className: "text-sm text-amber-800 dark:text-amber-200 bg-amber-100 dark:bg-amber-900 text-center px-2 rounded", children: ["Note: Showing only ", afterTrim, " of ", new Intl.NumberFormat().format(beforeTrim), " series for performance reasons. Please narrow your query to view more."] }), _jsxs("button", { onClick: () => setShowAllSeriesForResponse(response), className: "text-sm px-1 bg-amber-600 hover:bg-amber-700 dark:bg-amber-700 dark:hover:bg-amber-600 text-white rounded font-medium transition-colors", children: ["Show all ", new Intl.NumberFormat().format(beforeTrim)] })] })) : null, loading ? (_jsx(MetricsGraphSkeleton, { heightStyle: heightStyle, isDarkMode: isDarkMode })) : dataAvailable ? (_jsx(MetricsGraph, { data: transformedSeries, from: from, to: to, setTimeRange: setTimeRange, selectedPoint: selectedPoint, onSampleClick: (closestPoint) => {
248
+ return (_jsx(AnimatePresence, { children: _jsxs(motion.div, { className: "h-full w-full relative", initial: { display: 'none', opacity: 0 }, animate: { display: 'block', opacity: 1 }, transition: { duration: 0.5 }, children: [isTrimmed ? (_jsxs("div", { className: "flex justify-center items-center gap-2", ...testId(TEST_IDS.METRICS_GRAPH_TRIMMED_BANNER), children: [_jsxs("span", { className: "text-sm text-amber-800 dark:text-amber-200 bg-amber-100 dark:bg-amber-900 text-center px-2 rounded", children: ["Note: Showing only ", afterTrim, " of ", new Intl.NumberFormat().format(beforeTrim), " series for performance reasons. Please narrow your query to view more."] }), _jsxs("button", { onClick: () => setShowAllSeriesForResponse(response), className: "text-sm px-1 bg-amber-600 hover:bg-amber-700 dark:bg-amber-700 dark:hover:bg-amber-600 text-white rounded font-medium transition-colors", ...testId(TEST_IDS.METRICS_GRAPH_SHOW_ALL_BUTTON), children: ["Show all ", new Intl.NumberFormat().format(beforeTrim)] })] })) : null, loading ? (_jsx(MetricsGraphSkeleton, { heightStyle: heightStyle, isDarkMode: isDarkMode })) : dataAvailable ? (_jsx(MetricsGraph, { data: transformedSeries, from: from, to: to, setTimeRange: setTimeRange, selectedPoint: selectedPoint, onSampleClick: (closestPoint) => {
249
249
  // Use original data for both series and point
250
250
  if (originalSeries?.[closestPoint.seriesIndex] != null) {
251
251
  const originalSeriesData = originalSeries[closestPoint.seriesIndex];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/DashboardItems/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAW,wBAAwB,EAAC,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAIjD,OAAO,EAAC,gBAAgB,EAAC,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAIrD,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAEnC,UAAU,qBAAqB;IAC7B,IAAI,EAAE,iBAAiB,CAAC;IACxB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,cAAc,EAAE,cAAc,CAAC;IAC/B,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,YAAY,EAAE,YAAY,CAAC;IAC3B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,aAAa,EAAE,aAAa,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,kBAAkB,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IACvD,IAAI,CAAC,EAAE;QACL,QAAQ,CAAC,EAAE,wBAAwB,CAAC;KACrC,CAAC;IACF,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AAED,eAAO,MAAM,gBAAgB,GAAI,qLAe9B,qBAAqB,KAAG,GAAG,CAAC,OA+F9B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/DashboardItems/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAW,wBAAwB,EAAC,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAIjD,OAAO,EAAC,gBAAgB,EAAC,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAIrD,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAEnC,UAAU,qBAAqB;IAC7B,IAAI,EAAE,iBAAiB,CAAC;IACxB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,cAAc,EAAE,cAAc,CAAC;IAC/B,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,YAAY,EAAE,YAAY,CAAC;IAC3B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,aAAa,EAAE,aAAa,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,kBAAkB,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IACvD,IAAI,CAAC,EAAE;QACL,QAAQ,CAAC,EAAE,wBAAwB,CAAC;KACrC,CAAC;IACF,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AAED,eAAO,MAAM,gBAAgB,GAAI,qLAe9B,qBAAqB,KAAG,GAAG,CAAC,OAgG9B,CAAC"}
@@ -35,7 +35,7 @@ export const getDashboardItem = ({ type, isHalfScreen, dimensions, flamegraphDat
35
35
  : dimensions.width - 16
36
36
  : 0, metadataMappingFiles: flamechartData.metadataMappingFiles, metadataLoading: flamechartData.metadataLoading, profileSource: profileSource, isFlameChart: true }));
37
37
  case 'table':
38
- return topTableData != null ? (_jsx(Table, { total: total, filtered: filtered, loading: topTableData.loading, data: topTableData.arrow?.record, unit: topTableData.unit, profileType: profileSource?.ProfileType(), isHalfScreen: isHalfScreen, metadataMappingFiles: flamegraphData.metadataMappingFiles })) : (_jsx(_Fragment, {}));
38
+ return topTableData != null ? (_jsx(Table, { error: topTableData.error, total: total, filtered: filtered, loading: topTableData.loading, data: topTableData.arrow?.record, unit: topTableData.unit, profileType: profileSource?.ProfileType(), isHalfScreen: isHalfScreen, metadataMappingFiles: flamegraphData.metadataMappingFiles })) : (_jsx(_Fragment, {}));
39
39
  case 'sandwich':
40
40
  return topTableData != null ? (_jsx(Sandwich, { profileSource: profileSource, sandwichData: sandwichData })) : (_jsx(_Fragment, {}));
41
41
  case 'source':
@@ -1,3 +1,4 @@
1
+ import { RpcError } from '@protobuf-ts/runtime-rpc';
1
2
  import { FlamegraphArrow, QueryServiceClient, Source, TableArrow } from '@parca/client';
2
3
  import { ProfileSource } from '../../ProfileSource';
3
4
  export interface FlamegraphData {
@@ -5,7 +6,7 @@ export interface FlamegraphData {
5
6
  arrow?: FlamegraphArrow;
6
7
  total?: bigint;
7
8
  filtered?: bigint;
8
- error?: any;
9
+ error: RpcError | null;
9
10
  metadataMappingFiles?: string[];
10
11
  metadataLoading: boolean;
11
12
  metadataLabels?: string[];
@@ -16,13 +17,13 @@ export interface TopTableData {
16
17
  arrow?: TableArrow;
17
18
  total?: bigint;
18
19
  filtered?: bigint;
19
- error?: any;
20
+ error: RpcError | null;
20
21
  unit?: string;
21
22
  }
22
23
  export interface SourceData {
23
24
  loading: boolean;
24
25
  data?: Source;
25
- error?: any;
26
+ error: RpcError | null;
26
27
  }
27
28
  export interface SandwichData {
28
29
  callees: FlamegraphData;
@@ -1 +1 @@
1
- {"version":3,"file":"visualization.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/types/visualization.ts"],"names":[],"mappings":"AAaA,OAAO,EAAC,eAAe,EAAE,kBAAkB,EAAE,MAAM,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AAEtF,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;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AAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,MAAM,iBAAiB,GACzB,YAAY,GACZ,WAAW,GACX,OAAO,GACP,QAAQ,GACR,YAAY,GACZ,UAAU,CAAC;AAEf,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,cAAc,CAAC;IAC/B,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,EAAE,YAAY,CAAC;IAC3B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,aAAa,EAAE,aAAa,CAAC;IAC7B,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC"}
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { RpcError } from '@protobuf-ts/runtime-rpc';
2
3
  import { ProfileType } from '@parca/parser';
3
4
  import { DataRow } from './utils/functions';
4
5
  export declare const FIELD_MAPPING_FILE = "mapping_file";
@@ -23,6 +24,7 @@ export interface TableProps {
23
24
  isHalfScreen: boolean;
24
25
  unit?: string;
25
26
  metadataMappingFiles?: string[];
27
+ error: RpcError | null;
26
28
  }
27
29
  export declare const Table: React.NamedExoticComponent<TableProps>;
28
30
  export default Table;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Table/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAarE,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAS1C,OAAO,EAAC,OAAO,EAAmC,MAAM,mBAAmB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kB,iBAAiB,CAAC;AACjD,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AACzD,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AACnD,eAAO,MAAM,0BAA0B,yBAAyB,CAAC;AACjE,eAAO,MAAM,wBAAwB,uBAAuB,CAAC;AAC7D,eAAO,MAAM,UAAU,SAAS,CAAC;AACjC,eAAO,MAAM,eAAe,cAAc,CAAC;AAC3C,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAC7C,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AACvD,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,eAAO,MAAM,aAAa,YAAY,CAAC;AAEvC,MAAM,MAAM,GAAG,GAAG,OAAO,CAAC;AAE1B,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,KAAK,IAAI,CAAC;IACxD,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;CACxB;AAED,eAAO,MAAM,KAAK,wCA0MhB,CAAC;AAEH,eAAe,KAAK,CAAC"}
@@ -34,7 +34,7 @@ export const FIELD_CUMULATIVE = 'cumulative';
34
34
  export const FIELD_CUMULATIVE_DIFF = 'cumulative_diff';
35
35
  export const FIELD_CALLERS = 'callers';
36
36
  export const FIELD_CALLEES = 'callees';
37
- export const Table = React.memo(function Table({ data, total, filtered, profileType, loading, isHalfScreen, unit, metadataMappingFiles, }) {
37
+ export const Table = React.memo(function Table({ data, total, filtered, profileType, loading, isHalfScreen, unit, metadataMappingFiles, error, }) {
38
38
  const currentColorProfile = useCurrentColorProfile();
39
39
  const [dashboardItems] = useURLState('dashboard_items', {
40
40
  alwaysReturnArray: true,
@@ -142,6 +142,9 @@ export const Table = React.memo(function Table({ data, total, filtered, profileT
142
142
  if (loading) {
143
143
  return (_jsx("div", { className: "overflow-clip h-[700px] min-h-[700px]", children: _jsx(TableSkeleton, { isHalfScreen: isHalfScreen, isDarkMode: isDarkMode }) }));
144
144
  }
145
+ if (error != null) {
146
+ return _jsxs("div", { className: "mx-auto text-center", children: ["Error: ", error.message] });
147
+ }
145
148
  if (rows.length === 0) {
146
149
  return _jsx("div", { className: "mx-auto text-center", children: "Profile has no samples" });
147
150
  }
package/dist/useSumBy.js CHANGED
@@ -149,7 +149,7 @@ export const useDraftSumBy = (queryClient, profileType, timeRange, defaultValue)
149
149
  const { defaultSumBy, isLoading } = useDefaultSumBy(profileType, labelNamesLoading, labels);
150
150
  return {
151
151
  draftSumBy: draftSumBy ?? defaultSumBy ?? DEFAULT_EMPTY_SUM_BY,
152
- setDraftSumBy: setDraftSumBy,
152
+ setDraftSumBy,
153
153
  isDraftSumByLoading: isLoading,
154
154
  };
155
155
  };
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.19.104",
3
+ "version": "0.19.107",
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.16",
10
- "@parca/components": "0.16.392",
10
+ "@parca/components": "0.16.394",
11
11
  "@parca/dynamicsize": "0.16.72",
12
12
  "@parca/hooks": "0.0.116",
13
13
  "@parca/icons": "0.16.79",
14
14
  "@parca/parser": "0.16.86",
15
15
  "@parca/store": "0.16.199",
16
- "@parca/test-utils": "0.0.17",
16
+ "@parca/test-utils": "0.0.19",
17
17
  "@parca/utilities": "0.0.122",
18
18
  "@popperjs/core": "^2.11.8",
19
19
  "@protobuf-ts/runtime-rpc": "^2.5.0",
@@ -84,5 +84,5 @@
84
84
  "access": "public",
85
85
  "registry": "https://registry.npmjs.org/"
86
86
  },
87
- "gitHead": "dda36df880db636aa0279bc11163236c928b0b06"
87
+ "gitHead": "dc8ae4a8f538ea9f3c16e8f9047970c2ce2b8c2f"
88
88
  }
@@ -129,7 +129,7 @@ export const useVisibleNodes = ({
129
129
  renderedRangeRef.current = {
130
130
  minDepth: Infinity,
131
131
  maxDepth: -Infinity,
132
- table: table,
132
+ table,
133
133
  };
134
134
  }
135
135
 
@@ -377,7 +377,10 @@ const ProfileMetricsGraph = ({
377
377
  transition={{duration: 0.5}}
378
378
  >
379
379
  {isTrimmed ? (
380
- <div className="flex justify-center items-center gap-2">
380
+ <div
381
+ className="flex justify-center items-center gap-2"
382
+ {...testId(TEST_IDS.METRICS_GRAPH_TRIMMED_BANNER)}
383
+ >
381
384
  <span className="text-sm text-amber-800 dark:text-amber-200 bg-amber-100 dark:bg-amber-900 text-center px-2 rounded">
382
385
  Note: Showing only {afterTrim} of {new Intl.NumberFormat().format(beforeTrim)} series
383
386
  for performance reasons. Please narrow your query to view more.
@@ -385,6 +388,7 @@ const ProfileMetricsGraph = ({
385
388
  <button
386
389
  onClick={() => setShowAllSeriesForResponse(response)}
387
390
  className="text-sm px-1 bg-amber-600 hover:bg-amber-700 dark:bg-amber-700 dark:hover:bg-amber-600 text-white rounded font-medium transition-colors"
391
+ {...testId(TEST_IDS.METRICS_GRAPH_SHOW_ALL_BUTTON)}
388
392
  >
389
393
  Show all {new Intl.NumberFormat().format(beforeTrim)}
390
394
  </button>
@@ -128,6 +128,7 @@ export const getDashboardItem = ({
128
128
  case 'table':
129
129
  return topTableData != null ? (
130
130
  <Table
131
+ error={topTableData.error}
131
132
  total={total}
132
133
  filtered={filtered}
133
134
  loading={topTableData.loading}
@@ -11,6 +11,8 @@
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
13
 
14
+ import {RpcError} from '@protobuf-ts/runtime-rpc';
15
+
14
16
  import {FlamegraphArrow, QueryServiceClient, Source, TableArrow} from '@parca/client';
15
17
 
16
18
  import {ProfileSource} from '../../ProfileSource';
@@ -20,7 +22,7 @@ export interface FlamegraphData {
20
22
  arrow?: FlamegraphArrow;
21
23
  total?: bigint;
22
24
  filtered?: bigint;
23
- error?: any;
25
+ error: RpcError | null;
24
26
  metadataMappingFiles?: string[];
25
27
  metadataLoading: boolean;
26
28
  metadataLabels?: string[];
@@ -32,14 +34,14 @@ export interface TopTableData {
32
34
  arrow?: TableArrow;
33
35
  total?: bigint;
34
36
  filtered?: bigint;
35
- error?: any;
37
+ error: RpcError | null;
36
38
  unit?: string;
37
39
  }
38
40
 
39
41
  export interface SourceData {
40
42
  loading: boolean;
41
43
  data?: Source;
42
- error?: any;
44
+ error: RpcError | null;
43
45
  }
44
46
 
45
47
  export interface SandwichData {
@@ -13,6 +13,7 @@
13
13
 
14
14
  import React, {useCallback, useEffect, useMemo, useRef} from 'react';
15
15
 
16
+ import {RpcError} from '@protobuf-ts/runtime-rpc';
16
17
  import {tableFromIPC} from 'apache-arrow';
17
18
  import {AnimatePresence, motion} from 'framer-motion';
18
19
  import {useContextMenu} from 'react-contexify';
@@ -59,6 +60,7 @@ export interface TableProps {
59
60
  isHalfScreen: boolean;
60
61
  unit?: string;
61
62
  metadataMappingFiles?: string[];
63
+ error: RpcError | null;
62
64
  }
63
65
 
64
66
  export const Table = React.memo(function Table({
@@ -70,6 +72,7 @@ export const Table = React.memo(function Table({
70
72
  isHalfScreen,
71
73
  unit,
72
74
  metadataMappingFiles,
75
+ error,
73
76
  }: TableProps): React.JSX.Element {
74
77
  const currentColorProfile = useCurrentColorProfile();
75
78
  const [dashboardItems] = useURLState<string[]>('dashboard_items', {
@@ -220,6 +223,9 @@ export const Table = React.memo(function Table({
220
223
  </div>
221
224
  );
222
225
  }
226
+ if (error != null) {
227
+ return <div className="mx-auto text-center">Error: {error.message}</div>;
228
+ }
223
229
 
224
230
  if (rows.length === 0) {
225
231
  return <div className="mx-auto text-center">Profile has no samples</div>;
package/src/useSumBy.ts CHANGED
@@ -267,7 +267,7 @@ export const useDraftSumBy = (
267
267
 
268
268
  return {
269
269
  draftSumBy: draftSumBy ?? defaultSumBy ?? DEFAULT_EMPTY_SUM_BY,
270
- setDraftSumBy: setDraftSumBy,
270
+ setDraftSumBy,
271
271
  isDraftSumByLoading: isLoading,
272
272
  };
273
273
  };