@parca/profile 0.16.435 → 0.16.437

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.16.437 (2024-10-23)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
10
+ ## [0.16.436](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.435...@parca/profile@0.16.436) (2024-10-15)
11
+
12
+ **Note:** Version bump only for package @parca/profile
13
+
6
14
  ## 0.16.435 (2024-10-14)
7
15
 
8
16
  **Note:** Version bump only for package @parca/profile
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileSelector/index.tsx"],"names":[],"mappings":"AAaA,OAAc,EAAC,QAAQ,EAAE,cAAc,EAAuC,MAAM,OAAO,CAAC;AAG5F,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAC;AAIlD,OAAO,EAAQ,oBAAoB,EAAE,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAa9E,OAAO,EAAC,KAAK,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAyB,gBAAgB,EAAC,MAAM,IAAI,CAAC;AAU5D,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,oBAAoB;IAC5B,WAAW,EAAE,kBAAkB,CAAC;IAChC,cAAc,EAAE,cAAc,CAAC;IAC/B,aAAa,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAClD,WAAW,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7C,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,6BAA6B,EAAE,OAAO,CAAC;IACvC,gCAAgC,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CACrE;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,KAAK,CAAC,EAAE,QAAQ,CAAC;CAClB;AAED,eAAO,MAAM,eAAe,WAAY,kBAAkB,KAAG,mBAkB5D,CAAC;AAEF,QAAA,MAAM,eAAe,gOAalB,oBAAoB,KAAG,GAAG,CAAC,OA8Z7B,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileSelector/index.tsx"],"names":[],"mappings":"AAaA,OAAc,EAAC,QAAQ,EAAE,cAAc,EAAuC,MAAM,OAAO,CAAC;AAG5F,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAC;AAIlD,OAAO,EAAQ,oBAAoB,EAAE,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAa9E,OAAO,EAAC,KAAK,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAyB,gBAAgB,EAAC,MAAM,IAAI,CAAC;AAU5D,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,oBAAoB;IAC5B,WAAW,EAAE,kBAAkB,CAAC;IAChC,cAAc,EAAE,cAAc,CAAC;IAC/B,aAAa,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAClD,WAAW,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7C,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,6BAA6B,EAAE,OAAO,CAAC;IACvC,gCAAgC,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CACrE;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,KAAK,CAAC,EAAE,QAAQ,CAAC;CAClB;AAED,eAAO,MAAM,eAAe,WAAY,kBAAkB,KAAG,mBAkB5D,CAAC;AAEF,QAAA,MAAM,eAAe,gOAalB,oBAAoB,KAAG,GAAG,CAAC,OA+Z7B,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -184,7 +184,7 @@ const ProfileSelector = ({ queryClient, querySelection, selectProfile, selectQue
184
184
  pointer-events-none inline-block h-[16px] w-[16px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out` })] }), _jsx("label", { className: "text-xs", children: "Advanced Mode" })] }))] }), (query.matchers.length > 0 || query.inputMatcherString.length > 0) &&
185
185
  viewComponent !== undefined && _jsx("div", { children: viewComponent?.createViewComponent })] }), viewComponent?.disableExplorativeQuerying === true &&
186
186
  viewComponent?.labelnames !== undefined &&
187
- viewComponent?.labelnames.length >= 1 ? (_jsx(_Fragment, { children: _jsx(ViewMatchers, { labelNames: viewComponent.labelnames, setMatchersString: setMatchersString, profileType: selectedProfileName, runQuery: setQueryExpression, currentQuery: query, queryClient: queryClient }) })) : (_jsx(_Fragment, { children: advancedModeForQueryBrowser ? (_jsx(MatchersInput, { queryClient: queryClient, setMatchersString: setMatchersString, runQuery: setQueryExpression, currentQuery: query, profileType: selectedProfileName })) : (_jsx(SimpleMatchers, { queryClient: queryClient, setMatchersString: setMatchersString, runQuery: setQueryExpression, currentQuery: query, profileType: selectedProfileName, queryBrowserRef: queryBrowserRef })) }))] }), _jsxs("div", { children: [_jsx("div", { className: "mb-0.5 mt-1.5 flex items-center justify-between", children: _jsx("label", { className: "text-xs", children: "Sum by" }) }), _jsx(Select, { defaultValue: [], isMulti: true, name: "colors", options: labels.map(label => ({ label, value: label })), className: "parca-select-container text-sm w-full max-w-80", classNamePrefix: "parca-select", value: (sumBySelection ?? []).map(sumBy => ({ label: sumBy, value: sumBy })), onChange: selectedOptions => {
187
+ viewComponent?.labelnames.length >= 1 ? (_jsx(_Fragment, { children: _jsx(ViewMatchers, { labelNames: viewComponent.labelnames, setMatchersString: setMatchersString, profileType: selectedProfileName, runQuery: setQueryExpression, currentQuery: query, queryClient: queryClient }) })) : (_jsx(_Fragment, { children: advancedModeForQueryBrowser ? (_jsx(MatchersInput, { queryClient: queryClient, setMatchersString: setMatchersString, runQuery: setQueryExpression, currentQuery: query, profileType: selectedProfileName })) : (_jsx(SimpleMatchers, { queryClient: queryClient, setMatchersString: setMatchersString, runQuery: setQueryExpression, currentQuery: query, profileType: selectedProfileName, queryBrowserRef: queryBrowserRef })) }))] }), _jsxs("div", { children: [_jsx("div", { className: "mb-0.5 mt-1.5 flex items-center justify-between", children: _jsx("label", { className: "text-xs", children: "Sum by" }) }), _jsx(Select, { id: "h-sum-by-selector", defaultValue: [], isMulti: true, name: "colors", options: labels.map(label => ({ label, value: label })), className: "parca-select-container text-sm w-full max-w-80", classNamePrefix: "parca-select", value: (sumBySelection ?? []).map(sumBy => ({ label: sumBy, value: sumBy })), onChange: selectedOptions => {
188
188
  setUserSumBySelection(selectedOptions.map(option => option.value));
189
189
  }, placeholder: "Labels...", styles: {
190
190
  indicatorSeparator: () => ({ display: 'none' }),
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileViewWithData.d.ts","sourceRoot":"","sources":["../src/ProfileViewWithData.tsx"],"names":[],"mappings":"AAeA,OAAO,EAA0B,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAM1E,OAAO,EAAsB,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAKnE,UAAU,wBAAwB;IAChC,WAAW,EAAE,kBAAkB,CAAC;IAChC,aAAa,EAAE,aAAa,CAAC;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,mBAAmB,oCAG7B,wBAAwB,KAAG,GAAG,CAAC,OA6NjC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"ProfileViewWithData.d.ts","sourceRoot":"","sources":["../src/ProfileViewWithData.tsx"],"names":[],"mappings":"AAeA,OAAO,EAA0B,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAK1E,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAK9C,UAAU,wBAAwB;IAChC,WAAW,EAAE,kBAAkB,CAAC;IAChC,aAAa,EAAE,aAAa,CAAC;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,mBAAmB,oCAG7B,wBAAwB,KAAG,GAAG,CAAC,OAmNjC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -15,7 +15,6 @@ import { useEffect, useMemo, useState } from 'react';
15
15
  import { QueryRequest_ReportType } from '@parca/client';
16
16
  import { useGrpcMetadata, useParcaContext, useURLState } from '@parca/components';
17
17
  import { saveAsBlob } from '@parca/utilities';
18
- import { useLabelNames } from './MatchersInput';
19
18
  import { FIELD_FUNCTION_NAME } from './ProfileIcicleGraph/IcicleGraphArrow';
20
19
  import { ProfileView } from './ProfileView';
21
20
  import { useQuery } from './useQuery';
@@ -53,10 +52,7 @@ export const ProfileViewWithData = ({ queryClient, profileSource, }) => {
53
52
  invertCallStack,
54
53
  binaryFrameFilter,
55
54
  });
56
- const mergedProfileSource = profileSource;
57
- const matchers = mergedProfileSource.query.matchers.map(m => `${m.key}${m.matcherType}"${m.value}"`);
58
- const { result: profileLabelsResponse } = useLabelNames(queryClient, profileSource.ProfileType().toString(), undefined, undefined, matchers);
59
- const { isLoading: profilemetadataLoading, response: profilemetadataResponse } = useQuery(queryClient, profileSource, QueryRequest_ReportType.PROFILE_METADATA, {
55
+ const { isLoading: profileMetadataLoading, response: profileMetadataResponse } = useQuery(queryClient, profileSource, QueryRequest_ReportType.PROFILE_METADATA, {
60
56
  skip: !dashboardItems.includes('icicle'),
61
57
  nodeTrimThreshold,
62
58
  groupBy,
@@ -136,7 +132,7 @@ export const ProfileViewWithData = ({ queryClient, profileSource, }) => {
136
132
  filtered = BigInt(sourceResponse.filtered);
137
133
  }
138
134
  return (_jsx(ProfileView, { total: total, filtered: filtered, flamegraphData: {
139
- loading: flamegraphLoading && profilemetadataLoading,
135
+ loading: flamegraphLoading && profileMetadataLoading,
140
136
  data: flamegraphResponse?.report.oneofKind === 'flamegraph'
141
137
  ? flamegraphResponse?.report?.flamegraph
142
138
  : undefined,
@@ -146,11 +142,13 @@ export const ProfileViewWithData = ({ queryClient, profileSource, }) => {
146
142
  total: BigInt(flamegraphResponse?.total ?? '0'),
147
143
  filtered: BigInt(flamegraphResponse?.filtered ?? '0'),
148
144
  error: flamegraphError,
149
- mappings: profilemetadataResponse?.report.oneofKind === 'profileMetadata'
150
- ? profilemetadataResponse?.report?.profileMetadata?.mappingFiles
145
+ mappings: profileMetadataResponse?.report.oneofKind === 'profileMetadata'
146
+ ? profileMetadataResponse?.report?.profileMetadata?.mappingFiles
151
147
  : undefined,
152
- mappingsLoading: profilemetadataLoading,
153
- groupByLabels: profileLabelsResponse.response?.labelNames ?? [],
148
+ mappingsLoading: profileMetadataLoading,
149
+ groupByLabels: profileMetadataResponse?.report.oneofKind === 'profileMetadata'
150
+ ? profileMetadataResponse?.report?.profileMetadata?.labels
151
+ : [],
154
152
  }, topTableData: {
155
153
  loading: tableLoading,
156
154
  arrow: tableResponse?.report.oneofKind === 'tableArrow'
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/SimpleMatchers/index.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AAMpC,UAAU,KAAK;IACb,WAAW,EAAE,kBAAkB,CAAC;IAChC,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,EAAE,KAAK,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;CAClD;AAgED,QAAA,MAAM,cAAc,oFAOjB,KAAK,KAAG,GAAG,CAAC,OA4Pd,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/SimpleMatchers/index.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AAMpC,UAAU,KAAK;IACb,WAAW,EAAE,kBAAkB,CAAC;IAChC,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,EAAE,KAAK,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;CAClD;AAgED,QAAA,MAAM,cAAc,oFAOjB,KAAK,KAAG,GAAG,CAAC,OA+Pd,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -203,6 +203,6 @@ currentQuery, profileType, queryBrowserRef, }) => {
203
203
  };
204
204
  }, [queryRows, fetchLabelValues]);
205
205
  const isRowRegex = (row) => row.operator === '=~' || row.operator === '!~';
206
- return (_jsxs("div", { className: `flex items-center gap-3 ${maxWidthInPixels} w-full flex-wrap`, children: [visibleRows.map((row, index) => (_jsxs("div", { className: "flex items-center", children: [_jsx(Select, { items: labelNameOptions, onSelection: value => handleUpdateRow(index, 'labelName', value), placeholder: "Select label name", selectedKey: row.labelName, className: "rounded-tr-none rounded-br-none ring-0 focus:ring-0 outline-none", loading: labelNamesLoading, searchable: true }), _jsx(Select, { items: operatorOptions, onSelection: value => handleUpdateRow(index, 'operator', value), selectedKey: row.operator, className: "rounded-none ring-0 focus:ring-0 outline-none" }), _jsx(Select, { items: transformLabelsForSelect(row.labelValues), onSelection: value => handleUpdateRow(index, 'labelValue', value), placeholder: "Select label value", selectedKey: row.labelValue, className: "rounded-none ring-0 focus:ring-0 outline-none max-w-48", optionsClassname: "max-w-[300px]", searchable: true, disabled: row.labelName === '', loading: row.isLoading, onButtonClick: () => handleLabelValueClick(index), editable: isRowRegex(row) }), _jsx("button", { onClick: () => removeRow(index), className: cx('p-2 border-gray-200 border rounded rounded-tl-none rounded-bl-none focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:border-gray-600 dark:bg-gray-900'), children: _jsx(Icon, { icon: "carbon:close", className: "h-5 w-5 text-gray-400", "aria-hidden": "true" }) })] }, index))), queryRows.length > 3 && (_jsx("button", { onClick: () => setShowAll(!showAll), className: "mr-2 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", children: showAll ? 'Show less' : `Show ${hiddenRowsCount} more` })), _jsx("button", { onClick: addNewRow, className: "p-2 border-gray-200 dark:bg-gray-900 dark:border-gray-600 border rounded focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500", children: _jsx(Icon, { icon: "material-symbols:add", className: "h-5 w-5 text-gray-400", "aria-hidden": "true" }) })] }));
206
+ return (_jsxs("div", { className: `flex items-center gap-3 ${maxWidthInPixels} w-full flex-wrap`, id: "simple-matchers", children: [visibleRows.map((row, index) => (_jsxs("div", { className: "flex items-center", children: [_jsx(Select, { items: labelNameOptions, onSelection: value => handleUpdateRow(index, 'labelName', value), placeholder: "Select label name", selectedKey: row.labelName, className: "rounded-tr-none rounded-br-none ring-0 focus:ring-0 outline-none", loading: labelNamesLoading, searchable: true }), _jsx(Select, { items: operatorOptions, onSelection: value => handleUpdateRow(index, 'operator', value), selectedKey: row.operator, className: "rounded-none ring-0 focus:ring-0 outline-none" }), _jsx(Select, { items: transformLabelsForSelect(row.labelValues), onSelection: value => handleUpdateRow(index, 'labelValue', value), placeholder: "Select label value", selectedKey: row.labelValue, className: "rounded-none ring-0 focus:ring-0 outline-none max-w-48", optionsClassname: "max-w-[300px]", searchable: true, disabled: row.labelName === '', loading: row.isLoading, onButtonClick: () => handleLabelValueClick(index), editable: isRowRegex(row) }), _jsx("button", { onClick: () => removeRow(index), className: cx('p-2 border-gray-200 border rounded rounded-tl-none rounded-bl-none focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:border-gray-600 dark:bg-gray-900'), children: _jsx(Icon, { icon: "carbon:close", className: "h-5 w-5 text-gray-400", "aria-hidden": "true" }) })] }, index))), queryRows.length > 3 && (_jsx("button", { onClick: () => setShowAll(!showAll), className: "mr-2 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", children: showAll ? 'Show less' : `Show ${hiddenRowsCount} more` })), _jsx("button", { onClick: addNewRow, className: "p-2 border-gray-200 dark:bg-gray-900 dark:border-gray-600 border rounded focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500", children: _jsx(Icon, { icon: "material-symbols:add", className: "h-5 w-5 text-gray-400", "aria-hidden": "true" }) })] }));
207
207
  };
208
208
  export default SimpleMatchers;
@@ -116,7 +116,7 @@ const MultiLevelDropdown = ({ onSelect, profileType }) => {
116
116
  icon: 'system-uicons:reset',
117
117
  },
118
118
  ];
119
- return (_jsx("div", { className: "relative inline-block text-left", children: _jsx(Menu, { children: ({ open, close }) => (_jsxs(_Fragment, { children: [_jsx(Menu.Button, { className: "inline-flex dark:bg-gray-900 dark:border-gray-600 justify-center w-full px-4 py-2 text-sm font-medium text-white bg-white rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75 border border-gray-200", children: _jsx(Icon, { icon: "pepicons-pencil:dots-x", className: "h-5 w-5 text-gray-800 dark:text-gray-200" }) }), open && (_jsxs(Menu.Items, { className: "absolute z-30 right-0 w-56 mt-2 py-2 origin-top-right bg-white rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none border dark:bg-gray-900 dark:border-gray-600", children: [_jsx("span", { className: "text-xs text-gray-400 capitalize px-4 py-3", children: "actions" }), menuItems
119
+ return (_jsx("div", { className: "relative inline-block text-left", id: "h-visualisation-toolbar-actions", children: _jsx(Menu, { children: ({ open, close }) => (_jsxs(_Fragment, { children: [_jsx(Menu.Button, { className: "inline-flex dark:bg-gray-900 dark:border-gray-600 justify-center w-full px-4 py-2 text-sm font-medium text-white bg-white rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75 border border-gray-200", children: _jsx(Icon, { icon: "pepicons-pencil:dots-x", className: "h-5 w-5 text-gray-800 dark:text-gray-200" }) }), open && (_jsxs(Menu.Items, { className: "absolute z-30 right-0 w-56 mt-2 py-2 origin-top-right bg-white rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none border dark:bg-gray-900 dark:border-gray-600", children: [_jsx("span", { className: "text-xs text-gray-400 capitalize px-4 py-3", children: "actions" }), menuItems
120
120
  .filter(item => item.hide !== undefined && !item.hide)
121
121
  .map((item, index) => (_jsx(MenuItem, { ...item, onSelect: onSelect, closeDropdown: close, activeValue: storeSortBy }, index)))] }))] })) }) }));
122
122
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.16.435",
3
+ "version": "0.16.437",
4
4
  "description": "Profile viewing libraries",
5
5
  "dependencies": {
6
6
  "@headlessui/react": "^1.7.19",
@@ -73,5 +73,5 @@
73
73
  "access": "public",
74
74
  "registry": "https://registry.npmjs.org/"
75
75
  },
76
- "gitHead": "f97dc5a4d3b5abbf82c1647279b1186c6a43b69f"
76
+ "gitHead": "6e8c7d9911d6437b10b0448d81f80f093d5e157f"
77
77
  }
@@ -377,6 +377,7 @@ const ProfileSelector = ({
377
377
  <label className="text-xs">Sum by</label>
378
378
  </div>
379
379
  <Select
380
+ id="h-sum-by-selector"
380
381
  defaultValue={[]}
381
382
  isMulti
382
383
  name="colors"
@@ -17,9 +17,8 @@ import {QueryRequest_ReportType, QueryServiceClient} from '@parca/client';
17
17
  import {useGrpcMetadata, useParcaContext, useURLState} from '@parca/components';
18
18
  import {saveAsBlob} from '@parca/utilities';
19
19
 
20
- import {useLabelNames} from './MatchersInput';
21
20
  import {FIELD_FUNCTION_NAME} from './ProfileIcicleGraph/IcicleGraphArrow';
22
- import {MergedProfileSource, ProfileSource} from './ProfileSource';
21
+ import {ProfileSource} from './ProfileSource';
23
22
  import {ProfileView} from './ProfileView';
24
23
  import {useQuery} from './useQuery';
25
24
  import {downloadPprof} from './utils';
@@ -77,20 +76,7 @@ export const ProfileViewWithData = ({
77
76
  binaryFrameFilter,
78
77
  });
79
78
 
80
- const mergedProfileSource = profileSource as MergedProfileSource;
81
- const matchers = mergedProfileSource.query.matchers.map(
82
- m => `${m.key}${m.matcherType}"${m.value}"`
83
- );
84
-
85
- const {result: profileLabelsResponse} = useLabelNames(
86
- queryClient,
87
- profileSource.ProfileType().toString(),
88
- undefined,
89
- undefined,
90
- matchers
91
- );
92
-
93
- const {isLoading: profilemetadataLoading, response: profilemetadataResponse} = useQuery(
79
+ const {isLoading: profileMetadataLoading, response: profileMetadataResponse} = useQuery(
94
80
  queryClient,
95
81
  profileSource,
96
82
  QueryRequest_ReportType.PROFILE_METADATA,
@@ -201,7 +187,7 @@ export const ProfileViewWithData = ({
201
187
  total={total}
202
188
  filtered={filtered}
203
189
  flamegraphData={{
204
- loading: flamegraphLoading && profilemetadataLoading,
190
+ loading: flamegraphLoading && profileMetadataLoading,
205
191
  data:
206
192
  flamegraphResponse?.report.oneofKind === 'flamegraph'
207
193
  ? flamegraphResponse?.report?.flamegraph
@@ -214,11 +200,14 @@ export const ProfileViewWithData = ({
214
200
  filtered: BigInt(flamegraphResponse?.filtered ?? '0'),
215
201
  error: flamegraphError,
216
202
  mappings:
217
- profilemetadataResponse?.report.oneofKind === 'profileMetadata'
218
- ? profilemetadataResponse?.report?.profileMetadata?.mappingFiles
203
+ profileMetadataResponse?.report.oneofKind === 'profileMetadata'
204
+ ? profileMetadataResponse?.report?.profileMetadata?.mappingFiles
219
205
  : undefined,
220
- mappingsLoading: profilemetadataLoading,
221
- groupByLabels: profileLabelsResponse.response?.labelNames ?? [],
206
+ mappingsLoading: profileMetadataLoading,
207
+ groupByLabels:
208
+ profileMetadataResponse?.report.oneofKind === 'profileMetadata'
209
+ ? profileMetadataResponse?.report?.profileMetadata?.labels
210
+ : [],
222
211
  }}
223
212
  topTableData={{
224
213
  loading: tableLoading,
@@ -295,7 +295,10 @@ const SimpleMatchers = ({
295
295
  const isRowRegex = (row: QueryRow): boolean => row.operator === '=~' || row.operator === '!~';
296
296
 
297
297
  return (
298
- <div className={`flex items-center gap-3 ${maxWidthInPixels} w-full flex-wrap`}>
298
+ <div
299
+ className={`flex items-center gap-3 ${maxWidthInPixels} w-full flex-wrap`}
300
+ id="simple-matchers"
301
+ >
299
302
  {visibleRows.map((row, index) => (
300
303
  <div key={index} className="flex items-center">
301
304
  <Select
@@ -222,7 +222,7 @@ const MultiLevelDropdown: React.FC<MultiLevelDropdownProps> = ({onSelect, profil
222
222
  ];
223
223
 
224
224
  return (
225
- <div className="relative inline-block text-left">
225
+ <div className="relative inline-block text-left" id="h-visualisation-toolbar-actions">
226
226
  <Menu>
227
227
  {({open, close}) => (
228
228
  <>