@parca/profile 0.16.459 → 0.16.460

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,10 @@
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.460](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.459...@parca/profile@0.16.460) (2025-01-09)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
6
10
  ## [0.16.459](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.458...@parca/profile@0.16.459) (2025-01-08)
7
11
 
8
12
  **Note:** Version bump only for package @parca/profile
@@ -1 +1 @@
1
- {"version":3,"file":"ColorStackLegend.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraph/ColorStackLegend.tsx"],"names":[],"mappings":"AAsBA,UAAU,KAAK;IACb,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,gBAAgB,oBAA2B,KAAK,KAAG,GAAG,CAAC,OAgE5D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"ColorStackLegend.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraph/ColorStackLegend.tsx"],"names":[],"mappings":"AAsBA,UAAU,KAAK;IACb,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,gBAAgB,oBAA2B,KAAK,KAAG,GAAG,CAAC,OAmE5D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -50,7 +50,7 @@ const ColorStackLegend = ({ compareMode = false }) => {
50
50
  return;
51
51
  }
52
52
  setSearchString(feature);
53
- }, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("div", { className: "mr-1 inline-block h-4 w-4", style: { backgroundColor: color } }), _jsx("span", { className: "text-sm", children: feature })] }), isHighlighted ? (_jsx(Icon, { icon: "radix-icons:cross-circled", onClick: e => {
53
+ }, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("div", { className: "mr-1 inline-block h-4 w-4 rounded-[4px]", style: { backgroundColor: color } }), _jsx("span", { className: "text-sm", children: feature })] }), isHighlighted ? (_jsx(Icon, { icon: "radix-icons:cross-circled", onClick: e => {
54
54
  setSearchString('');
55
55
  e.stopPropagation();
56
56
  } })) : null] }, feature));
@@ -1 +1 @@
1
- {"version":3,"file":"ColorStackLegend.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/components/ColorStackLegend.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgB,MAAM,OAAO,CAAC;AAYrC,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,gBAAgB,uCAA8C,KAAK,KAAG,KAAK,CAAC,GAAG,CAAC,OAmGrF,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"ColorStackLegend.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/components/ColorStackLegend.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgB,MAAM,OAAO,CAAC;AAYrC,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,gBAAgB,uCAA8C,KAAK,KAAG,KAAK,CAAC,GAAG,CAAC,OAsGrF,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -58,7 +58,7 @@ const ColorStackLegend = ({ mappings, compareMode = false, loading }) => {
58
58
  const filteringAllowed = feature !== EVERYTHING_ELSE;
59
59
  const isHighlighted = currentSearchString !== undefined ? currentSearchString.includes(feature) : false;
60
60
  return (_jsxs("div", { className: cx('flex-no-wrap mb-1 flex w-[19.25%] items-center justify-between text-ellipsis p-1', {
61
- 'cursor-pointer': filteringAllowed,
61
+ 'cursor-pointer': filteringAllowed && colorBy === 'binary',
62
62
  'bg-gray-200 dark:bg-gray-800': isHighlighted,
63
63
  }), onClick: () => {
64
64
  if (!filteringAllowed || isHighlighted || colorBy !== 'binary') {
@@ -67,7 +67,7 @@ const ColorStackLegend = ({ mappings, compareMode = false, loading }) => {
67
67
  // Check if the current search string is defined and an array
68
68
  const updatedSearchString = [...currentSearchString, feature]; // If array, append the feature
69
69
  setSearchString(updatedSearchString);
70
- }, children: [_jsxs("div", { className: "flex w-11/12 items-center justify-start", children: [_jsx("div", { className: "flex w-5 items-center", children: _jsx("div", { className: "mr-1 inline-block h-4 w-4", style: { backgroundColor: color } }) }), _jsx("div", { className: "shrink overflow-hidden text-ellipsis whitespace-nowrap text-sm hover:whitespace-normal", children: feature })] }), _jsx("div", { className: "flex w-1/12 justify-end", children: isHighlighted && (_jsx(Icon, { icon: "radix-icons:cross-circled", onClick: e => {
70
+ }, children: [_jsxs("div", { className: "flex w-11/12 items-center justify-start", children: [_jsx("div", { className: "flex w-5 items-center", children: _jsx("div", { className: "mr-1 inline-block h-4 w-4 rounded-[4px]", style: { backgroundColor: color } }) }), _jsx("div", { className: "shrink overflow-hidden text-ellipsis whitespace-nowrap text-sm hover:whitespace-normal", children: feature })] }), _jsx("div", { className: "flex w-1/12 justify-end", children: isHighlighted && (_jsx(Icon, { icon: "radix-icons:cross-circled", onClick: e => {
71
71
  // remove the current feature from the search string array of strings
72
72
  setSearchString(currentSearchString.filter((f) => f !== feature));
73
73
  e.stopPropagation();
@@ -19,7 +19,7 @@ export const useProfileMetadata = ({ flamegraphArrow, metadataMappingFiles, meta
19
19
  }, [flamegraphArrow]);
20
20
  const mappingsList = useMappingList(metadataMappingFiles);
21
21
  const filenamesList = useFilenamesList(table);
22
- const colorMappings = colorBy === 'binary' ? mappingsList : filenamesList;
22
+ const colorMappings = colorBy === 'binary' || colorBy === '' ? mappingsList : filenamesList;
23
23
  return {
24
24
  table,
25
25
  mappingsList,
@@ -1 +1 @@
1
- {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/SimpleMatchers/Select.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAOzD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC;IACpB,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,UAAU,iBAAiB;IACzB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAgQ7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/SimpleMatchers/Select.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAOzD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC;IACpB,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,UAAU,iBAAiB;IACzB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAuQ7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -126,7 +126,12 @@ const CustomSelect = ({ items, selectedKey, onSelection, placeholder = 'Select a
126
126
  setIsOpen(false);
127
127
  }
128
128
  };
129
- return (_jsxs("div", { ref: containerRef, className: "relative", onKeyDown: handleKeyDown, onClick: onButtonClick, children: [_jsxs("div", { id: id, onClick: () => !disabled && setIsOpen(!isOpen), className: cx(styles, width !== undefined ? `w-${width}` : 'w-full', disabled ? 'cursor-not-allowed opacity-50 pointer-events-none' : '', primary ? primaryStyles : defaultStyles, { [className]: className.length > 0 }), tabIndex: 0, role: "button", "aria-haspopup": "listbox", "aria-expanded": isOpen, children: [_jsx("div", { className: cx(icon != null ? '' : 'block overflow-x-hidden text-ellipsis whitespace-nowrap'), children: renderSelection(selection) }), _jsx("div", { className: cx(icon != null ? '' : 'pointer-events-none text-gray-400'), children: icon ?? _jsx(Icon, { icon: "heroicons:chevron-up-down-20-solid", "aria-hidden": "true" }) })] }), isOpen && (_jsxs("div", { ref: optionsRef, className: cx('absolute z-50 mt-1 pt-0 max-h-[50vh] w-max overflow-auto rounded-md bg-gray-50 py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:border-gray-600 dark:bg-gray-900 dark:ring-white dark:ring-opacity-20 sm:text-sm', { [optionsClassname]: optionsClassname.length > 0 }), role: "listbox", children: [searchable && (_jsx("div", { className: "sticky z-10 top-[-5px] w-auto max-w-full", children: _jsx("div", { className: "flex flex-col", children: editable ? (_jsxs(_Fragment, { children: [_jsx("textarea", { ref: searchInputRef, className: "w-full px-4 py-2 text-sm border-b border-gray-200 rounded-none ring-0 outline-none bg-gray-50 dark:bg-gray-800 dark:text-white min-h-[50px]", placeholder: "Type a RegEx to add", value: searchTerm, onChange: e => setSearchTerm(e.target.value) }), editable && searchTerm.length > 0 && (_jsx("div", { className: "p-2 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800", children: _jsx(Button, { variant: "primary", className: "w-full h-[30px]", onClick: () => {
129
+ const moveCaretToEnd = (e) => {
130
+ const value = e.target.value;
131
+ e.target.value = '';
132
+ e.target.value = value;
133
+ };
134
+ return (_jsxs("div", { ref: containerRef, className: "relative", onKeyDown: handleKeyDown, onClick: onButtonClick, children: [_jsxs("div", { id: id, onClick: () => !disabled && setIsOpen(!isOpen), className: cx(styles, width !== undefined ? `w-${width}` : 'w-full', disabled ? 'cursor-not-allowed opacity-50 pointer-events-none' : '', primary ? primaryStyles : defaultStyles, { [className]: className.length > 0 }), tabIndex: 0, role: "button", "aria-haspopup": "listbox", "aria-expanded": isOpen, children: [_jsx("div", { className: cx(icon != null ? '' : 'block overflow-x-hidden text-ellipsis whitespace-nowrap'), children: renderSelection(selection) }), _jsx("div", { className: cx(icon != null ? '' : 'pointer-events-none text-gray-400'), children: icon ?? _jsx(Icon, { icon: "heroicons:chevron-up-down-20-solid", "aria-hidden": "true" }) })] }), isOpen && (_jsxs("div", { ref: optionsRef, className: cx('absolute z-50 mt-1 pt-0 max-h-[50vh] w-max overflow-auto rounded-md bg-gray-50 py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:border-gray-600 dark:bg-gray-900 dark:ring-white dark:ring-opacity-20 sm:text-sm', { [optionsClassname]: optionsClassname.length > 0 }), role: "listbox", children: [searchable && (_jsx("div", { className: "sticky z-10 top-[-5px] w-auto max-w-full", children: _jsx("div", { className: "flex flex-col", children: editable ? (_jsxs(_Fragment, { children: [_jsx("textarea", { ref: searchInputRef, className: "w-full px-4 py-2 text-sm border-b border-gray-200 rounded-none ring-0 outline-none bg-gray-50 dark:bg-gray-800 dark:text-white min-h-[50px]", placeholder: "Type a RegEx to add", value: searchTerm, onChange: e => setSearchTerm(e.target.value), onFocus: e => moveCaretToEnd(e) }), editable && searchTerm.length > 0 && (_jsx("div", { className: "p-2 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800", children: _jsx(Button, { variant: "primary", className: "w-full h-[30px]", onClick: () => {
130
135
  onSelection(searchTerm);
131
136
  setIsOpen(false);
132
137
  }, children: "Add" }) }))] })) : (_jsx("input", { ref: searchInputRef, type: "text", className: "w-full px-4 h-[45px] text-sm border-none rounded-none ring-0 outline-none bg-gray-50 dark:bg-gray-800 dark:text-white", placeholder: "Search...", value: searchTerm, onChange: e => setSearchTerm(e.target.value) })) }) })), loading === true ? (_jsx("div", { className: "w-[270px]", children: loader })) : (filteredItems.map((item, index) => (_jsxs("div", { ref: el => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Table/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAsB/E,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAS1C,OAAO,EAEL,OAAO,EACP,QAAQ,EAgBT,MAAM,mBAAmB,CAAC;AAe3B,MAAM,MAAM,GAAG,GAAG,OAAO,GAAG,QAAQ,CAAC;AAErC,eAAO,MAAM,UAAU,QAAS,GAAG,KAAG,GAAG,IAAI,QAE5C,CAAC;AAIF,UAAU,UAAU;IAClB,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,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,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;CACjC;AAkID,eAAO,MAAM,KAAK,wCA4chB,CAAC;AAEH,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Table/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAuB/E,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAS1C,OAAO,EAEL,OAAO,EACP,QAAQ,EAgBT,MAAM,mBAAmB,CAAC;AAe3B,MAAM,MAAM,GAAG,GAAG,OAAO,GAAG,QAAQ,CAAC;AAErC,eAAO,MAAM,UAAU,QAAS,GAAG,KAAG,GAAG,IAAI,QAE5C,CAAC;AAIF,UAAU,UAAU;IAClB,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,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,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;CACjC;AAkID,eAAO,MAAM,KAAK,wCAydhB,CAAC;AAEH,eAAe,KAAK,CAAC"}
@@ -17,9 +17,10 @@ import { createColumnHelper, } from '@tanstack/table-core';
17
17
  import { tableFromIPC, vectorFromArray } from 'apache-arrow';
18
18
  import cx from 'classnames';
19
19
  import { AnimatePresence, motion } from 'framer-motion';
20
+ import { Tooltip } from 'react-tooltip';
20
21
  import { Table as TableComponent, TableSkeleton, useParcaContext, useURLState, } from '@parca/components';
21
22
  import { useCurrentColorProfile } from '@parca/hooks';
22
- import { isSearchMatch, valueFormatter } from '@parca/utilities';
23
+ import { getLastItem, isSearchMatch, valueFormatter } from '@parca/utilities';
23
24
  import { getFilenameColors, getMappingColors } from '../ProfileIcicleGraph/IcicleGraphArrow/';
24
25
  import useMappingList, { useFilenamesList, } from '../ProfileIcicleGraph/IcicleGraphArrow/useMappingList';
25
26
  import { useProfileViewContext } from '../ProfileView/context/ProfileViewContext';
@@ -148,12 +149,12 @@ export const Table = React.memo(function Table({ data, total, filtered, profileT
148
149
  unit = useMemo(() => unit ?? profileType?.sampleUnit ?? '', [unit, profileType?.sampleUnit]);
149
150
  const columns = useMemo(() => {
150
151
  return [
151
- columnHelper.accessor('color', {
152
+ columnHelper.accessor('colorProperty', {
152
153
  id: 'color',
153
154
  header: '',
154
155
  cell: info => {
155
156
  const color = info.getValue();
156
- return _jsx("div", { className: "w-4 h-4 rounded-[4px]", style: { backgroundColor: color } });
157
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: "w-4 h-4 rounded-[4px]", style: { backgroundColor: color.color }, "data-tooltip-id": "table-color-tooltip", "data-tooltip-content": getLastItem(color.mappingFile) }), _jsx(Tooltip, { id: "table-color-tooltip" })] }));
157
158
  },
158
159
  size: 10,
159
160
  }),
@@ -390,7 +391,10 @@ export const Table = React.memo(function Table({ data, total, filtered, profileT
390
391
  const mappingFile = mappingFileColumn?.get(i) ?? '';
391
392
  return {
392
393
  id: i,
393
- color: getRowColor(colorByColors, mappingFileColumn, i, functionFileNameColumn, colorBy),
394
+ colorProperty: {
395
+ color: getRowColor(colorByColors, mappingFileColumn, i, functionFileNameColumn, colorBy),
396
+ mappingFile,
397
+ },
394
398
  name: RowName(mappingFileColumn, locationAddressColumn, functionNameColumn, i),
395
399
  flat,
396
400
  flatDiff,
@@ -3,7 +3,10 @@ import { Vector } from 'apache-arrow';
3
3
  import { colorByColors } from '../../ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes';
4
4
  export interface DataRow {
5
5
  id: number;
6
- color: string;
6
+ colorProperty: {
7
+ color: string;
8
+ mappingFile: string;
9
+ };
7
10
  name: string;
8
11
  flat: bigint;
9
12
  flatDiff: bigint;
@@ -1 +1 @@
1
- {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../src/Table/utils/functions.ts"],"names":[],"mappings":"AAaA,OAAO,EAAC,KAAK,GAAG,IAAI,OAAO,EAAC,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAIpC,OAAO,EAAC,aAAa,EAAC,MAAM,4D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B,gBAAgB,GAChB,0BAA0B,GAC1B,MAAM,GACN,oBAAoB,GACpB,kBAAkB,GAClB,aAAa,CAAC;AAElB,eAAO,MAAM,eAAe,eACd,OAAO,YACT,OAAO,KAChB,MAAM,CAAC,MAAM,EAAE,OAAO,CAMxB,CAAC;AAEF,eAAO,MAAM,UAAU,KAAK,CAAC;AAE7B,eAAO,MAAM,iBAAiB,SAAU,MAAM,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAIrE,CAAC;AAEF,eAAO,MAAM,gBAAgB,SAAU,MAAM,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAIpE,CAAC;AAEF,eAAO,MAAM,iBAAiB,SAAU,MAAM,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAIrE,CAAC;AAEF,eAAO,MAAM,aAAa,YAAa,OAAO,EAAE,KAAG,GAAG,EAarD,CAAC;AAEF,eAAO,MAAM,aAAa,YAAa,OAAO,EAAE,KAAG,GAAG,EAarD,CAAC;AAEF,eAAO,MAAM,mBAAmB,UAAW,MAAM,GAAG,MAAM,SAAS,MAAM,GAAG,MAAM,KAAG,MAOpF,CAAC;AAEF,eAAO,MAAM,cAAc,UAAW,MAAM,GAAG,MAAM,SAAS,MAAM,YAAY,MAAM,KAAG,MAMxF,CAAC;AAEF,eAAO,MAAM,eAAe,UAa3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,UAAW,MAAM,GAAG,MAAM,SAAS,MAAM,GAAG,MAAM,KAAG,MAOjF,CAAC;AAEF,eAAO,MAAM,WAAW,UAAW,MAAM,GAAG,MAAM,SAAS,MAAM,YAAY,MAAM,KAAG,MAMrF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.16.459",
3
+ "version": "0.16.460",
4
4
  "description": "Profile viewing libraries",
5
5
  "dependencies": {
6
6
  "@headlessui/react": "^1.7.19",
@@ -74,5 +74,5 @@
74
74
  "access": "public",
75
75
  "registry": "https://registry.npmjs.org/"
76
76
  },
77
- "gitHead": "e92cda4da962e2d09da37cf973d419b7ca839562"
77
+ "gitHead": "801d740c8340a5ca9e9ed638c24c8c805b50c94b"
78
78
  }
@@ -71,7 +71,10 @@ const ColorStackLegend = ({compareMode = false}: Props): JSX.Element => {
71
71
  }}
72
72
  >
73
73
  <div className="flex items-center">
74
- <div className="mr-1 inline-block h-4 w-4" style={{backgroundColor: color}} />
74
+ <div
75
+ className="mr-1 inline-block h-4 w-4 rounded-[4px]"
76
+ style={{backgroundColor: color}}
77
+ />
75
78
  <span className="text-sm">{feature}</span>
76
79
  </div>
77
80
  {isHighlighted ? (
@@ -88,7 +88,7 @@ const ColorStackLegend = ({mappings, compareMode = false, loading}: Props): Reac
88
88
  className={cx(
89
89
  'flex-no-wrap mb-1 flex w-[19.25%] items-center justify-between text-ellipsis p-1',
90
90
  {
91
- 'cursor-pointer': filteringAllowed,
91
+ 'cursor-pointer': filteringAllowed && colorBy === 'binary',
92
92
  'bg-gray-200 dark:bg-gray-800': isHighlighted,
93
93
  }
94
94
  )}
@@ -105,7 +105,10 @@ const ColorStackLegend = ({mappings, compareMode = false, loading}: Props): Reac
105
105
  >
106
106
  <div className="flex w-11/12 items-center justify-start">
107
107
  <div className="flex w-5 items-center">
108
- <div className="mr-1 inline-block h-4 w-4" style={{backgroundColor: color}} />
108
+ <div
109
+ className="mr-1 inline-block h-4 w-4 rounded-[4px]"
110
+ style={{backgroundColor: color}}
111
+ />
109
112
  </div>
110
113
  <div className="shrink overflow-hidden text-ellipsis whitespace-nowrap text-sm hover:whitespace-normal">
111
114
  {feature}
@@ -47,7 +47,7 @@ export const useProfileMetadata = ({
47
47
  const mappingsList = useMappingList(metadataMappingFiles);
48
48
  const filenamesList = useFilenamesList(table);
49
49
 
50
- const colorMappings = colorBy === 'binary' ? mappingsList : filenamesList;
50
+ const colorMappings = colorBy === 'binary' || colorBy === '' ? mappingsList : filenamesList;
51
51
 
52
52
  return {
53
53
  table,
@@ -183,6 +183,12 @@ const CustomSelect: React.FC<CustomSelectProps> = ({
183
183
  }
184
184
  };
185
185
 
186
+ const moveCaretToEnd = (e: React.FocusEvent<HTMLTextAreaElement>): void => {
187
+ const value = e.target.value;
188
+ e.target.value = '';
189
+ e.target.value = value;
190
+ };
191
+
186
192
  return (
187
193
  <div ref={containerRef} className="relative" onKeyDown={handleKeyDown} onClick={onButtonClick}>
188
194
  <div
@@ -232,6 +238,7 @@ const CustomSelect: React.FC<CustomSelectProps> = ({
232
238
  placeholder="Type a RegEx to add"
233
239
  value={searchTerm}
234
240
  onChange={e => setSearchTerm(e.target.value)}
241
+ onFocus={e => moveCaretToEnd(e)}
235
242
  />
236
243
  {editable && searchTerm.length > 0 && (
237
244
  <div className="p-2 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800">
@@ -24,6 +24,7 @@ import {
24
24
  import {Int64, Vector, tableFromIPC, vectorFromArray} from 'apache-arrow';
25
25
  import cx from 'classnames';
26
26
  import {AnimatePresence, motion} from 'framer-motion';
27
+ import {Tooltip} from 'react-tooltip';
27
28
 
28
29
  import {
29
30
  Table as TableComponent,
@@ -34,7 +35,7 @@ import {
34
35
  import {type RowRendererProps} from '@parca/components/dist/Table';
35
36
  import {useCurrentColorProfile} from '@parca/hooks';
36
37
  import {ProfileType} from '@parca/parser';
37
- import {isSearchMatch, valueFormatter} from '@parca/utilities';
38
+ import {getLastItem, isSearchMatch, valueFormatter} from '@parca/utilities';
38
39
 
39
40
  import {getFilenameColors, getMappingColors} from '../ProfileIcicleGraph/IcicleGraphArrow/';
40
41
  import {colorByColors} from '../ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes';
@@ -303,12 +304,22 @@ export const Table = React.memo(function Table({
303
304
 
304
305
  const columns = useMemo<Array<ColumnDef<Row>>>(() => {
305
306
  return [
306
- columnHelper.accessor('color', {
307
+ columnHelper.accessor('colorProperty', {
307
308
  id: 'color',
308
309
  header: '',
309
310
  cell: info => {
310
- const color = info.getValue() as string;
311
- return <div className="w-4 h-4 rounded-[4px]" style={{backgroundColor: color}} />;
311
+ const color = info.getValue() as {color: string; mappingFile: string};
312
+ return (
313
+ <>
314
+ <div
315
+ className="w-4 h-4 rounded-[4px]"
316
+ style={{backgroundColor: color.color}}
317
+ data-tooltip-id="table-color-tooltip"
318
+ data-tooltip-content={getLastItem(color.mappingFile)}
319
+ />
320
+ <Tooltip id="table-color-tooltip" />
321
+ </>
322
+ );
312
323
  },
313
324
  size: 10,
314
325
  }),
@@ -577,13 +588,16 @@ export const Table = React.memo(function Table({
577
588
 
578
589
  return {
579
590
  id: i,
580
- color: getRowColor(
581
- colorByColors,
582
- mappingFileColumn,
583
- i,
584
- functionFileNameColumn,
585
- colorBy as string
586
- ),
591
+ colorProperty: {
592
+ color: getRowColor(
593
+ colorByColors,
594
+ mappingFileColumn,
595
+ i,
596
+ functionFileNameColumn,
597
+ colorBy as string
598
+ ),
599
+ mappingFile,
600
+ },
587
601
  name: RowName(mappingFileColumn, locationAddressColumn, functionNameColumn, i),
588
602
  flat,
589
603
  flatDiff,
@@ -21,7 +21,10 @@ import {hexifyAddress} from '../../utils';
21
21
 
22
22
  export interface DataRow {
23
23
  id: number;
24
- color: string;
24
+ colorProperty: {
25
+ color: string;
26
+ mappingFile: string;
27
+ };
25
28
  name: string;
26
29
  flat: bigint;
27
30
  flatDiff: bigint;