@parca/profile 0.16.198 → 0.16.200

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.
Files changed (71) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/Callgraph/index.d.ts +0 -1
  3. package/dist/GraphTooltip/ExpandOnHoverValue.d.ts +0 -1
  4. package/dist/GraphTooltip/index.d.ts +0 -1
  5. package/dist/GraphTooltipArrow/ExpandOnHoverValue.d.ts +6 -0
  6. package/dist/GraphTooltipArrow/ExpandOnHoverValue.js +4 -0
  7. package/dist/GraphTooltipArrow/index.d.ts +43 -0
  8. package/dist/GraphTooltipArrow/index.js +244 -0
  9. package/dist/MatchersInput/SuggestionItem.d.ts +0 -1
  10. package/dist/MatchersInput/SuggestionsList.d.ts +0 -1
  11. package/dist/MatchersInput/index.d.ts +0 -1
  12. package/dist/MetricsCircle/index.d.ts +0 -1
  13. package/dist/MetricsGraph/MetricsTooltip/index.d.ts +0 -1
  14. package/dist/MetricsGraph/index.d.ts +5 -3
  15. package/dist/MetricsGraph/index.js +3 -8
  16. package/dist/MetricsGraph/useMetricsGraphDimensions.d.ts +9 -0
  17. package/dist/MetricsGraph/useMetricsGraphDimensions.js +29 -0
  18. package/dist/MetricsSeries/index.d.ts +0 -1
  19. package/dist/ProfileExplorer/ProfileExplorerCompare.d.ts +0 -1
  20. package/dist/ProfileExplorer/ProfileExplorerSingle.d.ts +0 -1
  21. package/dist/ProfileExplorer/index.d.ts +0 -1
  22. package/dist/ProfileIcicleGraph/IcicleGraph/ColorStackLegend.d.ts +0 -1
  23. package/dist/ProfileIcicleGraph/IcicleGraphArrow/ColorStackLegend.d.ts +10 -0
  24. package/dist/ProfileIcicleGraph/IcicleGraphArrow/ColorStackLegend.js +64 -0
  25. package/dist/ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.d.ts +48 -0
  26. package/dist/ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.js +150 -0
  27. package/dist/ProfileIcicleGraph/IcicleGraphArrow/index.d.ts +23 -0
  28. package/dist/ProfileIcicleGraph/IcicleGraphArrow/index.js +110 -0
  29. package/dist/ProfileIcicleGraph/IcicleGraphArrow/useNodeColor.d.ts +14 -0
  30. package/dist/ProfileIcicleGraph/IcicleGraphArrow/useNodeColor.js +26 -0
  31. package/dist/ProfileIcicleGraph/IcicleGraphArrow/utils.d.ts +4 -0
  32. package/dist/ProfileIcicleGraph/IcicleGraphArrow/utils.js +42 -0
  33. package/dist/ProfileIcicleGraph/index.d.ts +4 -3
  34. package/dist/ProfileIcicleGraph/index.js +7 -5
  35. package/dist/ProfileMetricsGraph/index.d.ts +4 -1
  36. package/dist/ProfileMetricsGraph/index.js +24 -14
  37. package/dist/ProfileSelector/CompareButton.d.ts +0 -1
  38. package/dist/ProfileSelector/index.d.ts +0 -1
  39. package/dist/ProfileSelector/index.js +44 -35
  40. package/dist/ProfileSelector/useAutoQuerySelector.d.ts +9 -0
  41. package/dist/ProfileSelector/useAutoQuerySelector.js +66 -0
  42. package/dist/ProfileSource.d.ts +0 -1
  43. package/dist/ProfileTypeSelector/index.d.ts +1 -1
  44. package/dist/ProfileTypeSelector/index.js +4 -3
  45. package/dist/ProfileView/FilterByFunctionButton.d.ts +0 -1
  46. package/dist/ProfileView/ViewSelector.d.ts +0 -1
  47. package/dist/ProfileView/index.d.ts +2 -1
  48. package/dist/ProfileView/index.js +3 -3
  49. package/dist/ProfileViewWithData.d.ts +0 -1
  50. package/dist/ProfileViewWithData.js +16 -7
  51. package/dist/components/DiffLegend.d.ts +0 -1
  52. package/dist/components/ProfileShareButton/ResultBox.d.ts +0 -1
  53. package/dist/components/ProfileShareButton/index.d.ts +0 -1
  54. package/dist/styles.css +1 -1
  55. package/package.json +6 -5
  56. package/src/GraphTooltipArrow/ExpandOnHoverValue.tsx +30 -0
  57. package/src/GraphTooltipArrow/index.tsx +564 -0
  58. package/src/MetricsGraph/index.tsx +24 -20
  59. package/src/MetricsGraph/useMetricsGraphDimensions.ts +42 -0
  60. package/src/ProfileIcicleGraph/IcicleGraphArrow/ColorStackLegend.tsx +109 -0
  61. package/src/ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.tsx +327 -0
  62. package/src/ProfileIcicleGraph/IcicleGraphArrow/index.tsx +212 -0
  63. package/src/ProfileIcicleGraph/IcicleGraphArrow/useNodeColor.ts +52 -0
  64. package/src/ProfileIcicleGraph/IcicleGraphArrow/utils.ts +51 -0
  65. package/src/ProfileIcicleGraph/index.tsx +34 -14
  66. package/src/ProfileMetricsGraph/index.tsx +38 -20
  67. package/src/ProfileSelector/index.tsx +66 -54
  68. package/src/ProfileSelector/useAutoQuerySelector.ts +87 -0
  69. package/src/ProfileTypeSelector/index.tsx +9 -10
  70. package/src/ProfileView/index.tsx +5 -2
  71. package/src/ProfileViewWithData.tsx +22 -7
@@ -18,9 +18,11 @@ import { Query } from '@parca/parser';
18
18
  import { getStepDuration, getStepDurationInMilliseconds } from '@parca/utilities';
19
19
  import { MergedProfileSelection } from '..';
20
20
  import MatchersInput from '../MatchersInput/index';
21
- import ProfileMetricsGraph from '../ProfileMetricsGraph';
21
+ import { useMetricsGraphDimensions } from '../MetricsGraph/useMetricsGraphDimensions';
22
+ import ProfileMetricsGraph, { ProfileMetricsEmptyState } from '../ProfileMetricsGraph';
22
23
  import ProfileTypeSelector from '../ProfileTypeSelector/index';
23
24
  import CompareButton from './CompareButton';
25
+ import { useAutoQuerySelector } from './useAutoQuerySelector';
24
26
  export const useProfileTypes = (client) => {
25
27
  const [result, setResult] = useState(undefined);
26
28
  const [error, setError] = useState(undefined);
@@ -40,6 +42,7 @@ export const useProfileTypes = (client) => {
40
42
  };
41
43
  const ProfileSelector = ({ queryClient, querySelection, selectProfile, selectQuery, closeProfile, enforcedProfileName, profileSelection, comparing, onCompareProfile, }) => {
42
44
  const { loading: profileTypesLoading, data: profileTypesData, error, } = useProfileTypes(queryClient);
45
+ const { heightStyle } = useMetricsGraphDimensions();
43
46
  const [timeRangeSelection, setTimeRangeSelection] = useState(DateTimeRange.fromRangeKey(querySelection.timeSelection));
44
47
  const [queryExpressionString, setQueryExpressionString] = useState(querySelection.expression);
45
48
  useEffect(() => {
@@ -105,6 +108,12 @@ const ProfileSelector = ({ queryClient, querySelection, selectProfile, selectQue
105
108
  setQueryExpressionString(q);
106
109
  }
107
110
  };
111
+ useAutoQuerySelector({
112
+ selectedProfileName,
113
+ profileTypesData,
114
+ setProfileName,
115
+ setQueryExpression,
116
+ });
108
117
  const handleCompareClick = () => onCompareProfile();
109
118
  const searchDisabled = queryExpressionString === undefined ||
110
119
  queryExpressionString === '' ||
@@ -113,40 +122,40 @@ const ProfileSelector = ({ queryClient, querySelection, selectProfile, selectQue
113
122
  return (_jsxs(Card, { className: "overflow-visible", children: [_jsxs(Card.Header, { className: "flex !items-center space-x-2", children: [_jsxs("div", { className: "flex w-full flex-wrap items-center justify-start space-x-2 space-y-1", children: [_jsx("div", { className: "ml-2 mt-1", children: _jsx(ProfileTypeSelector, { profileTypesData: profileTypesData, loading: profileTypesLoading, selectedKey: selectedProfileName, onSelection: setProfileName, error: error }) }), _jsx("div", { className: "w-full flex-1", children: _jsx(MatchersInput, { queryClient: queryClient, setMatchersString: setMatchersString, runQuery: setQueryExpression, currentQuery: query }) }), _jsx(DateTimeRangePicker, { onRangeSelection: setTimeRangeSelection, range: timeRangeSelection }), _jsxs(ButtonGroup, { children: [!searchDisabled && (_jsx(_Fragment, { children: !comparing && (_jsx(CompareButton, { disabled: compareDisabled, onClick: handleCompareClick })) })), _jsx(Button, { disabled: searchDisabled, onClick: (e) => {
114
123
  e.preventDefault();
115
124
  setQueryExpression();
116
- }, children: "Search" })] })] }), _jsx("div", { children: comparing && _jsx(IconButton, { onClick: () => closeProfile(), icon: _jsx(CloseIcon, {}) }) })] }), _jsx(Card.Body, { children: querySelection.expression !== undefined &&
117
- querySelection.expression.length > 0 &&
118
- querySelection.from !== undefined &&
119
- querySelection.to !== undefined ? (_jsx(ProfileMetricsGraph, { queryClient: queryClient, queryExpression: querySelection.expression, from: querySelection.from, to: querySelection.to, profile: profileSelection, setTimeRange: (range) => {
120
- const from = range.getFromMs();
121
- const to = range.getToMs();
122
- let mergedProfileParams = {};
123
- if (query.profileType().delta) {
124
- mergedProfileParams = { mergeFrom: from, mergeTo: to };
125
- }
126
- setTimeRangeSelection(range);
127
- selectQuery({
128
- expression: queryExpressionString,
129
- from,
130
- to,
131
- timeSelection: range.getRangeKey(),
132
- ...mergedProfileParams,
133
- });
134
- }, addLabelMatcher: addLabelMatcher, onPointClick: (timestamp, labels, queryExpression) => {
135
- // TODO: Pass the query object via click rather than queryExpression
136
- let query = Query.parse(queryExpression);
137
- labels.forEach(l => {
138
- const [newQuery, updated] = query.setMatcher(l.name, l.value);
139
- if (updated) {
140
- query = newQuery;
125
+ }, children: "Search" })] })] }), _jsx("div", { children: comparing && _jsx(IconButton, { onClick: () => closeProfile(), icon: _jsx(CloseIcon, {}) }) })] }), _jsx(Card.Body, { children: _jsx("div", { style: { height: heightStyle }, children: querySelection.expression !== undefined &&
126
+ querySelection.expression.length > 0 &&
127
+ querySelection.from !== undefined &&
128
+ querySelection.to !== undefined ? (_jsx(ProfileMetricsGraph, { queryClient: queryClient, queryExpression: querySelection.expression, from: querySelection.from, to: querySelection.to, profile: profileSelection, setTimeRange: (range) => {
129
+ const from = range.getFromMs();
130
+ const to = range.getToMs();
131
+ let mergedProfileParams = {};
132
+ if (query.profileType().delta) {
133
+ mergedProfileParams = { mergeFrom: from, mergeTo: to };
141
134
  }
142
- });
143
- const stepDuration = getStepDuration(querySelection.from, querySelection.to);
144
- const stepDurationInMilliseconds = getStepDurationInMilliseconds(stepDuration);
145
- const mergeFrom = timestamp;
146
- const mergeTo = query.profileType().delta
147
- ? mergeFrom + stepDurationInMilliseconds
148
- : mergeFrom;
149
- selectProfile(new MergedProfileSelection(mergeFrom, mergeTo, query));
150
- } })) : (_jsx(_Fragment, { children: profileSelection == null && (_jsx("div", { className: "my-20 text-center", children: _jsx("p", { children: "Run a query, and the result will be displayed here." }) })) })) })] }));
135
+ setTimeRangeSelection(range);
136
+ selectQuery({
137
+ expression: queryExpressionString,
138
+ from,
139
+ to,
140
+ timeSelection: range.getRangeKey(),
141
+ ...mergedProfileParams,
142
+ });
143
+ }, addLabelMatcher: addLabelMatcher, onPointClick: (timestamp, labels, queryExpression) => {
144
+ // TODO: Pass the query object via click rather than queryExpression
145
+ let query = Query.parse(queryExpression);
146
+ labels.forEach(l => {
147
+ const [newQuery, updated] = query.setMatcher(l.name, l.value);
148
+ if (updated) {
149
+ query = newQuery;
150
+ }
151
+ });
152
+ const stepDuration = getStepDuration(querySelection.from, querySelection.to);
153
+ const stepDurationInMilliseconds = getStepDurationInMilliseconds(stepDuration);
154
+ const mergeFrom = timestamp;
155
+ const mergeTo = query.profileType().delta
156
+ ? mergeFrom + stepDurationInMilliseconds
157
+ : mergeFrom;
158
+ selectProfile(new MergedProfileSelection(mergeFrom, mergeTo, query));
159
+ } })) : (_jsx(_Fragment, { children: profileSelection == null ? (_jsx(ProfileMetricsEmptyState, { message: `Please select a profile type and click "Search" to begin.` })) : null })) }) })] }));
151
160
  };
152
161
  export default ProfileSelector;
@@ -0,0 +1,9 @@
1
+ import { ProfileTypesResponse } from '@parca/client';
2
+ interface Props {
3
+ selectedProfileName: string;
4
+ profileTypesData: ProfileTypesResponse | undefined;
5
+ setProfileName: (name: string) => void;
6
+ setQueryExpression: () => void;
7
+ }
8
+ export declare const useAutoQuerySelector: ({ selectedProfileName, profileTypesData, setProfileName, setQueryExpression, }: Props) => void;
9
+ export {};
@@ -0,0 +1,66 @@
1
+ // Copyright 2022 The Parca Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ import { useEffect } from 'react';
14
+ import { selectAutoQuery, setAutoQuery, useAppDispatch, useAppSelector } from '@parca/store';
15
+ import { constructProfileName } from '../ProfileTypeSelector';
16
+ export const useAutoQuerySelector = ({ selectedProfileName, profileTypesData, setProfileName, setQueryExpression, }) => {
17
+ const autoQuery = useAppSelector(selectAutoQuery);
18
+ const dispatch = useAppDispatch();
19
+ // Effect to load some initial data on load when is no selection
20
+ useEffect(() => {
21
+ void (async () => {
22
+ if (selectedProfileName.length > 0) {
23
+ return;
24
+ }
25
+ if (profileTypesData?.types == null || profileTypesData.types.length < 1) {
26
+ return;
27
+ }
28
+ if (autoQuery === 'true') {
29
+ // Autoquery already enabled.
30
+ return;
31
+ }
32
+ dispatch(setAutoQuery('true'));
33
+ let profileType = profileTypesData.types.find(type => type.name === 'parca_agent_cpu');
34
+ if (profileType == null) {
35
+ profileType = profileTypesData.types[0];
36
+ }
37
+ setProfileName(constructProfileName(profileType));
38
+ })();
39
+ }, [
40
+ profileTypesData,
41
+ selectedProfileName,
42
+ autoQuery,
43
+ dispatch,
44
+ setQueryExpression,
45
+ setProfileName,
46
+ ]);
47
+ useEffect(() => {
48
+ void (async () => {
49
+ if (autoQuery !== 'true' ||
50
+ profileTypesData?.types == null ||
51
+ profileTypesData.types.length < 1 ||
52
+ selectedProfileName.length === 0) {
53
+ return;
54
+ }
55
+ setQueryExpression();
56
+ dispatch(setAutoQuery('false'));
57
+ })();
58
+ }, [
59
+ profileTypesData,
60
+ setQueryExpression,
61
+ autoQuery,
62
+ setProfileName,
63
+ dispatch,
64
+ selectedProfileName,
65
+ ]);
66
+ };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Label, ProfileDiffSelection, QueryRequest } from '@parca/client';
3
2
  import { ProfileType, Query } from '@parca/parser';
4
3
  export interface ProfileSource {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { RpcError } from '@protobuf-ts/runtime-rpc';
3
2
  import { ProfileType, ProfileTypesResponse } from '@parca/client';
4
3
  import { type SelectElement } from '@parca/components';
@@ -11,6 +10,7 @@ interface WellKnownProfiles {
11
10
  }
12
11
  export declare const wellKnownProfiles: WellKnownProfiles;
13
12
  export declare function profileSelectElement(name: string, flexibleKnownProfilesDetection: boolean): SelectElement;
13
+ export declare const constructProfileName: (type: ProfileType) => string;
14
14
  export declare const normalizeProfileTypesData: (types: ProfileType[]) => string[];
15
15
  interface Props {
16
16
  profileTypesData?: ProfileTypesResponse;
@@ -102,10 +102,11 @@ export function profileSelectElement(name, flexibleKnownProfilesDetection) {
102
102
  expanded: (_jsxs(_Fragment, { children: [_jsx("span", { children: title }), _jsx("br", {}), _jsx("span", { className: "text-xs", children: wellKnown.help })] })),
103
103
  };
104
104
  }
105
+ export const constructProfileName = (type) => {
106
+ return `${type.name}:${type.sampleType}:${type.sampleUnit}:${type.periodType}:${type.periodUnit}${type.delta ? ':delta' : ''}`;
107
+ };
105
108
  export const normalizeProfileTypesData = (types) => {
106
- return types
107
- .map(type => `${type.name}:${type.sampleType}:${type.sampleUnit}:${type.periodType}:${type.periodUnit}${type.delta ? ':delta' : ''}`)
108
- .sort((a, b) => {
109
+ return types.map(constructProfileName).sort((a, b) => {
109
110
  return a.localeCompare(b);
110
111
  });
111
112
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { NavigateFunction } from '@parca/utilities';
3
2
  declare const FilterByFunctionButton: ({ navigateTo, }: {
4
3
  navigateTo: NavigateFunction | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { NavigateFunction } from '@parca/utilities';
3
2
  interface Props {
4
3
  position: number;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { Table } from 'apache-arrow';
2
2
  import { Callgraph as CallgraphType, Flamegraph, QueryServiceClient, Top } from '@parca/client';
3
3
  import { ProfileSource } from '../ProfileSource';
4
4
  type NavigateFunction = (path: string, queryParams: any, options?: {
@@ -7,6 +7,7 @@ type NavigateFunction = (path: string, queryParams: any, options?: {
7
7
  export interface FlamegraphData {
8
8
  loading: boolean;
9
9
  data?: Flamegraph;
10
+ table?: Table<any>;
10
11
  total?: bigint;
11
12
  filtered?: bigint;
12
13
  error?: any;
@@ -39,7 +39,7 @@ function arrayEquals(a, b) {
39
39
  export const ProfileView = ({ total, filtered, flamegraphData, topTableData, callgraphData, sampleUnit, profileSource, queryClient, navigateTo, onDownloadPProf, pprofDownloading, }) => {
40
40
  const { ref, dimensions } = useContainerDimensions();
41
41
  const [curPath, setCurPath] = useState([]);
42
- const [rawDashboardItems, setDashboardItems] = useURLState({
42
+ const [rawDashboardItems = ['icicle'], setDashboardItems] = useURLState({
43
43
  param: 'dashboard_items',
44
44
  navigateTo,
45
45
  });
@@ -124,10 +124,10 @@ export const ProfileView = ({ total, filtered, flamegraphData, topTableData, cal
124
124
  const getDashboardItemByType = ({ type, isHalfScreen, setActionButtons, }) => {
125
125
  switch (type) {
126
126
  case 'icicle': {
127
- return flamegraphData?.data != null ? (_jsx(ConditionalWrapper, { condition: perf?.onRender != null, WrapperComponent: Profiler, wrapperProps: {
127
+ return flamegraphData?.table !== undefined || flamegraphData.data !== undefined ? (_jsx(ConditionalWrapper, { condition: perf?.onRender != null, WrapperComponent: Profiler, wrapperProps: {
128
128
  id: 'icicleGraph',
129
129
  onRender: perf?.onRender,
130
- }, children: _jsx(ProfileIcicleGraph, { curPath: curPath, setNewCurPath: setNewCurPath, graph: flamegraphData.data, total: total, filtered: filtered, sampleUnit: sampleUnit, navigateTo: navigateTo, loading: flamegraphData.loading, setActionButtons: setActionButtons }) })) : (_jsx(_Fragment, { children: " " }));
130
+ }, children: _jsx(ProfileIcicleGraph, { curPath: curPath, setNewCurPath: setNewCurPath, table: flamegraphData.table, graph: flamegraphData.data, total: total, filtered: filtered, sampleUnit: sampleUnit, navigateTo: navigateTo, loading: flamegraphData.loading, setActionButtons: setActionButtons }) })) : (_jsx(_Fragment, { children: " " }));
131
131
  }
132
132
  case 'callgraph': {
133
133
  return callgraphData?.data !== undefined &&
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { QueryServiceClient } from '@parca/client';
3
2
  import { type NavigateFunction } from '@parca/utilities';
4
3
  import { ProfileSource } from './ProfileSource';
@@ -12,17 +12,19 @@ import { jsx as _jsx } from "react/jsx-runtime";
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
14
  import { useEffect, useMemo, useState } from 'react';
15
+ import { tableFromIPC } from 'apache-arrow';
15
16
  import { QueryRequest_ReportType } from '@parca/client';
16
17
  import { useGrpcMetadata, useParcaContext, useURLState } from '@parca/components';
17
- import { USER_PREFERENCES, useUserPreference } from '@parca/hooks';
18
+ import { USER_PREFERENCES, useUIFeatureFlag, useUserPreference } from '@parca/hooks';
18
19
  import { saveAsBlob } from '@parca/utilities';
19
20
  import { ProfileView } from './ProfileView';
20
21
  import { useQuery } from './useQuery';
21
22
  import { downloadPprof } from './utils';
22
23
  export const ProfileViewWithData = ({ queryClient, profileSource, navigateTo, }) => {
23
24
  const metadata = useGrpcMetadata();
24
- const [dashboardItems] = useURLState({ param: 'dashboard_items', navigateTo });
25
+ const [dashboardItems = ['icicle']] = useURLState({ param: 'dashboard_items', navigateTo });
25
26
  const [enableTrimming] = useUserPreference(USER_PREFERENCES.ENABLE_GRAPH_TRIMMING.key);
27
+ const [arrowFlamegraphEnabled] = useUIFeatureFlag('flamegraph-arrow');
26
28
  const [pprofDownloading, setPprofDownloading] = useState(false);
27
29
  const nodeTrimThreshold = useMemo(() => {
28
30
  if (!enableTrimming) {
@@ -35,7 +37,10 @@ export const ProfileViewWithData = ({ queryClient, profileSource, navigateTo, })
35
37
  width = width - 12 - 16 - 12;
36
38
  return (1 / width) * 100;
37
39
  }, [enableTrimming]);
38
- const { isLoading: flamegraphLoading, response: flamegraphResponse, error: flamegraphError, } = useQuery(queryClient, profileSource, QueryRequest_ReportType.FLAMEGRAPH_TABLE, {
40
+ const reportType = arrowFlamegraphEnabled
41
+ ? QueryRequest_ReportType.FLAMEGRAPH_ARROW
42
+ : QueryRequest_ReportType.FLAMEGRAPH_TABLE;
43
+ const { isLoading: flamegraphLoading, response: flamegraphResponse, error: flamegraphError, } = useQuery(queryClient, profileSource, reportType, {
39
44
  skip: !dashboardItems.includes('icicle'),
40
45
  nodeTrimThreshold,
41
46
  });
@@ -47,14 +52,15 @@ export const ProfileViewWithData = ({ queryClient, profileSource, navigateTo, })
47
52
  skip: !dashboardItems.includes('callgraph'),
48
53
  });
49
54
  useEffect(() => {
50
- if (!flamegraphLoading && flamegraphResponse?.report.oneofKind === 'flamegraph') {
51
- perf?.markInteraction('Flamegraph render', flamegraphResponse.report.flamegraph.total);
55
+ if ((!flamegraphLoading && flamegraphResponse?.report.oneofKind === 'flamegraph') ||
56
+ flamegraphResponse?.report.oneofKind === 'flamegraphArrow') {
57
+ perf?.markInteraction('Flamegraph render', flamegraphResponse.total);
52
58
  }
53
59
  if (!topTableLoading && topTableResponse?.report.oneofKind === 'top') {
54
- perf?.markInteraction('Top table render', topTableResponse?.report?.top.total);
60
+ perf?.markInteraction('Top table render', topTableResponse.total);
55
61
  }
56
62
  if (!callgraphLoading && callgraphResponse?.report.oneofKind === 'callgraph') {
57
- perf?.markInteraction('Callgraph render', callgraphResponse?.report?.callgraph.cumulative);
63
+ perf?.markInteraction('Callgraph render', callgraphResponse.total);
58
64
  }
59
65
  }, [
60
66
  flamegraphLoading,
@@ -102,6 +108,9 @@ export const ProfileViewWithData = ({ queryClient, profileSource, navigateTo, })
102
108
  data: flamegraphResponse?.report.oneofKind === 'flamegraph'
103
109
  ? flamegraphResponse?.report?.flamegraph
104
110
  : undefined,
111
+ table: flamegraphResponse?.report.oneofKind === 'flamegraphArrow'
112
+ ? tableFromIPC(flamegraphResponse?.report?.flamegraphArrow.record)
113
+ : undefined,
105
114
  total: BigInt(flamegraphResponse?.total ?? '0'),
106
115
  filtered: BigInt(flamegraphResponse?.filtered ?? '0'),
107
116
  error: flamegraphError,
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const DiffLegend: () => JSX.Element;
3
2
  export default DiffLegend;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface Props {
3
2
  value: string;
4
3
  className?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { QueryRequest, QueryServiceClient } from '@parca/client';
3
2
  interface Props {
4
3
  queryRequest: QueryRequest;
package/dist/styles.css CHANGED
@@ -1 +1 @@
1
- /*! tailwindcss v3.2.4 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-feature-settings:normal;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.visible{visibility:visible}.invisible{visibility:hidden}.absolute{position:absolute}.relative{position:relative}.-inset-2{bottom:-.5rem;left:-.5rem;right:-.5rem;top:-.5rem}.left-\[25px\]{left:25px}.left-0{left:0}.top-\[-46px\]{top:-46px}.right-0{right:0}.z-50{z-index:50}.z-10{z-index:10}.m-auto{margin:auto}.m-0{margin:0}.m-2{margin:.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.my-2{margin-bottom:.5rem;margin-top:.5rem}.my-20{margin-bottom:5rem;margin-top:5rem}.my-6{margin-bottom:1.5rem;margin-top:1.5rem}.mt-1{margin-top:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mb-2{margin-bottom:.5rem}.mr-6{margin-right:1.5rem}.mr-3{margin-right:.75rem}.mr-1{margin-right:.25rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-fit{height:-moz-fit-content;height:fit-content}.h-10{height:2.5rem}.h-1{height:.25rem}.h-\[80vh\]{height:80vh}.h-4{height:1rem}.max-h-\[400px\]{max-height:400px}.min-h-52{min-height:13rem}.w-full{width:100%}.w-auto{width:auto}.w-1\/4{width:25%}.w-3\/4{width:75%}.w-\[500px\]{width:500px}.w-40{width:10rem}.w-1\/2{width:50%}.w-8{width:2rem}.w-4{width:1rem}.w-16{width:4rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-\[420px\]{width:420px}.min-w-\[300px\]{min-width:300px}.max-w-\[500px\]{max-width:500px}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-grow{flex-grow:1}.table-auto{table-layout:auto}.table-fixed{table-layout:fixed}.translate-y-1{--tw-translate-y:0.25rem}.translate-y-0,.translate-y-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.\!items-center{align-items:center!important}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-1{gap:.25rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.25rem*var(--tw-space-x-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-scroll{overflow:scroll}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-l{border-bottom-left-radius:.25rem;border-top-left-radius:.25rem}.rounded-r{border-bottom-right-radius:.25rem;border-top-right-radius:.25rem}.border{border-width:1px}.border-r-0{border-right-width:0}.border-l-0{border-left-width:0}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.bg-inherit{background-color:inherit}.fill-transparent{fill:transparent}.fill-current{fill:currentColor}.stroke-white{stroke:#fff}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-10{padding:2.5rem}.p-4{padding:1rem}.p-1{padding:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-20{padding-bottom:5rem;padding-top:5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.px-1{padding-left:.25rem;padding-right:.25rem}.pr-0{padding-right:0}.pl-3{padding-left:.75rem}.pr-9{padding-right:2.25rem}.pt-2{padding-top:.5rem}.pb-4{padding-bottom:1rem}.pr-2{padding-right:.5rem}.pl-2{padding-left:.5rem}.pb-2{padding-bottom:.5rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.text-base{font-size:1rem;line-height:1.5rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-semibold{font-weight:600}.font-bold{font-weight:700}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.\!text-indigo-600{--tw-text-opacity:1!important;color:rgb(79 70 229/var(--tw-text-opacity))!important}.opacity-100{opacity:1}.opacity-0{opacity:0}.opacity-90{opacity:.9}.opacity-50{opacity:.5}.shadow-\[0_0_10px_2px_rgba\(0\2c 0\2c 0\2c 0\.3\)\]{--tw-shadow:0 0 10px 2px rgba(0,0,0,.3);--tw-shadow-colored:0 0 10px 2px var(--tw-shadow-color)}.shadow-\[0_0_10px_2px_rgba\(0\2c 0\2c 0\2c 0\.3\)\],.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-black{--tw-ring-opacity:1;--tw-ring-color:rgb(0 0 0/var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity:0.05}.blur{--tw-blur:blur(8px)}.blur,.invert{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert:invert(100%)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.duration-150{transition-duration:.15s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-indigo-800:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(55 48 163/var(--tw-ring-opacity))}.group:hover .group-hover\:flex{display:flex}[class~=theme-dark] .dark\:border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity))}[class~=theme-dark] .dark\:bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}[class~=theme-dark] .dark\:bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}[class~=theme-dark] .dark\:bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}[class~=theme-dark] .dark\:stroke-gray-700{stroke:#374151}[class~=theme-dark] .dark\:text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}[class~=theme-dark] .dark\:text-gray-50{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}[class~=theme-dark] .dark\:text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}[class~=theme-dark] .dark\:\!text-indigo-400{--tw-text-opacity:1!important;color:rgb(129 140 248/var(--tw-text-opacity))!important}@media (min-width:640px){.sm\:inline{display:inline}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:1024px){.lg\:w-1\/2{width:50%}}
1
+ /*! tailwindcss v3.2.4 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.visible{visibility:visible}.invisible{visibility:hidden}.absolute{position:absolute}.relative{position:relative}.-inset-2{top:-.5rem;right:-.5rem;bottom:-.5rem;left:-.5rem}.left-\[25px\]{left:25px}.left-0{left:0}.top-\[-46px\]{top:-46px}.right-0{right:0}.z-50{z-index:50}.z-10{z-index:10}.m-auto{margin:auto}.m-2{margin:.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-20{margin-top:5rem;margin-bottom:5rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.mt-1{margin-top:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mb-2{margin-bottom:.5rem}.mr-6{margin-right:1.5rem}.mr-3{margin-right:.75rem}.mr-1{margin-right:.25rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-fit{height:-moz-fit-content;height:fit-content}.h-10{height:2.5rem}.h-full{height:100%}.h-1{height:.25rem}.h-\[80vh\]{height:80vh}.h-4{height:1rem}.max-h-\[400px\]{max-height:400px}.min-h-52{min-height:13rem}.w-full{width:100%}.w-auto{width:auto}.w-1\/4{width:25%}.w-3\/4{width:75%}.w-\[500px\]{width:500px}.w-40{width:10rem}.w-1\/2{width:50%}.w-8{width:2rem}.w-4{width:1rem}.w-16{width:4rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-\[420px\]{width:420px}.min-w-\[300px\]{min-width:300px}.max-w-\[500px\]{max-width:500px}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-grow{flex-grow:1}.table-auto{table-layout:auto}.table-fixed{table-layout:fixed}.translate-y-1{--tw-translate-y:0.25rem}.translate-y-0,.translate-y-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.\!items-center{align-items:center!important}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-1{gap:.25rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem*var(--tw-space-x-reverse));margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.25rem*var(--tw-space-x-reverse));margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-scroll{overflow:scroll}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.border{border-width:1px}.border-r-0{border-right-width:0}.border-l-0{border-left-width:0}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.bg-inherit{background-color:inherit}.fill-transparent{fill:#0000}.fill-current{fill:currentColor}.stroke-white{stroke:#fff}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-10{padding:2.5rem}.p-4{padding:1rem}.p-1{padding:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.px-1{padding-left:.25rem;padding-right:.25rem}.pr-0{padding-right:0}.pl-3{padding-left:.75rem}.pr-9{padding-right:2.25rem}.pt-2{padding-top:.5rem}.pb-4{padding-bottom:1rem}.pr-2{padding-right:.5rem}.pl-2{padding-left:.5rem}.pb-2{padding-bottom:.5rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.text-base{font-size:1rem;line-height:1.5rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-semibold{font-weight:600}.font-bold{font-weight:700}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.\!text-indigo-600{--tw-text-opacity:1!important;color:rgb(79 70 229/var(--tw-text-opacity))!important}.opacity-100{opacity:1}.opacity-0{opacity:0}.opacity-90{opacity:.9}.opacity-50{opacity:.5}.shadow-\[0_0_10px_2px_rgba\(0\2c 0\2c 0\2c 0\.3\)\]{--tw-shadow:0 0 10px 2px #0000004d;--tw-shadow-colored:0 0 10px 2px var(--tw-shadow-color)}.shadow-\[0_0_10px_2px_rgba\(0\2c 0\2c 0\2c 0\.3\)\],.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.outline-none{outline:2px solid #0000;outline-offset:2px}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-black{--tw-ring-opacity:1;--tw-ring-color:rgb(0 0 0/var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity:0.05}.blur{--tw-blur:blur(8px)}.blur,.invert{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert:invert(100%)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.duration-150{transition-duration:.15s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus\:ring-indigo-800:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(55 48 163/var(--tw-ring-opacity))}.group:hover .group-hover\:flex{display:flex}[class~=theme-dark] .dark\:border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity))}[class~=theme-dark] .dark\:bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}[class~=theme-dark] .dark\:bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}[class~=theme-dark] .dark\:bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}[class~=theme-dark] .dark\:stroke-gray-700{stroke:#374151}[class~=theme-dark] .dark\:text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}[class~=theme-dark] .dark\:text-gray-50{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}[class~=theme-dark] .dark\:text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}[class~=theme-dark] .dark\:\!text-indigo-400{--tw-text-opacity:1!important;color:rgb(129 140 248/var(--tw-text-opacity))!important}@media (min-width:640px){.sm\:inline{display:inline}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:1024px){.lg\:w-1\/2{width:50%}}
package/package.json CHANGED
@@ -1,17 +1,18 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.16.198",
3
+ "version": "0.16.200",
4
4
  "description": "Profile viewing libraries",
5
5
  "dependencies": {
6
6
  "@parca/client": "^0.16.76",
7
- "@parca/components": "^0.16.158",
7
+ "@parca/components": "^0.16.160",
8
8
  "@parca/dynamicsize": "^0.16.54",
9
9
  "@parca/hooks": "^0.0.11",
10
10
  "@parca/parser": "^0.16.55",
11
- "@parca/store": "^0.16.85",
12
- "@parca/utilities": "^0.0.15",
11
+ "@parca/store": "^0.16.87",
12
+ "@parca/utilities": "^0.0.16",
13
13
  "@tanstack/react-query": "^4.0.5",
14
14
  "@types/react-beautiful-dnd": "^13.1.3",
15
+ "apache-arrow": "^12.0.0",
15
16
  "d3": "7.8.5",
16
17
  "d3-scale": "^4.0.2",
17
18
  "d3-selection": "3.0.0",
@@ -46,5 +47,5 @@
46
47
  "access": "public",
47
48
  "registry": "https://registry.npmjs.org/"
48
49
  },
49
- "gitHead": "6fb652a4800d7a5263b4af5a0eec2b9bc0f86658"
50
+ "gitHead": "146fa268226d3a3f45cc413100dd369b6151424a"
50
51
  }
@@ -0,0 +1,30 @@
1
+ // Copyright 2022 The Parca Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+
14
+ interface Props {
15
+ value: string | number | undefined;
16
+ displayValue?: string | number | undefined;
17
+ }
18
+
19
+ export const ExpandOnHover = ({value, displayValue}: Props): JSX.Element => {
20
+ return (
21
+ <div className="group relative w-full">
22
+ <div className="w-full overflow-hidden text-ellipsis whitespace-nowrap">
23
+ {displayValue ?? value}
24
+ </div>
25
+ <div className="absolute -inset-2 hidden h-fit max-w-[500px] whitespace-normal break-all rounded bg-gray-50 p-2 shadow-[0_0_10px_2px_rgba(0,0,0,0.3)] group-hover:flex dark:bg-gray-900">
26
+ {value}
27
+ </div>
28
+ </div>
29
+ );
30
+ };