@parca/profile 0.16.421 → 0.16.423

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.423](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.422...@parca/profile@0.16.423) (2024-08-08)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
10
+ ## [0.16.422](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.421...@parca/profile@0.16.422) (2024-08-07)
11
+
12
+ **Note:** Version bump only for package @parca/profile
13
+
6
14
  ## [0.16.421](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.420...@parca/profile@0.16.421) (2024-08-07)
7
15
 
8
16
  **Note:** Version bump only for package @parca/profile
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileSource.d.ts","sourceRoot":"","sources":["../src/ProfileSource.tsx"],"names":[],"mappings":"AAaA,OAAO,EACL,oBAAoB,EAEpB,YAAY,EAIb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAqB,WAAW,EAAE,KAAK,EAAC,MAAM,eAAe,CAAC;AAGrE,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,MAAM,YAAY,CAAC;IACjC,WAAW,EAAE,MAAM,WAAW,CAAC;IAC/B,aAAa,EAAE,MAAM,oBAAoB,CAAC;IAC1C,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;CACzC;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,CAAC;IAC1C,aAAa,EAAE,MAAM,aAAa,CAAC;IACnC,IAAI,EAAE,MAAM,MAAM,CAAC;CACpB;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AE,aAAa,EAAE,CAAC,EAAE,aAAa,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO;IAQxF,aAAa,IAAI,oBAAoB;IAIrC,YAAY,IAAI,YAAY;IAiB5B,WAAW,IAAI,WAAW;IAI1B,QAAQ,IAAI,GAAG,CAAC,OAAO;IAQvB,QAAQ,IAAI,MAAM;CAUnB;AAED,qBAAa,mBAAoB,YAAW,aAAa;IACvD,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,WAAW,EAAE,WAAW,CAAC;gBAEb,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,CAAC,EAAE,MAAM;IAQlF,aAAa,IAAI,oBAAoB;IAcrC,YAAY,IAAI,YAAY;IAiB5B,WAAW,IAAI,WAAW;IAI1B,cAAc,IAAI,MAAM,EAAE;IAM1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM;CAmBpC"}
@@ -13,7 +13,7 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
13
13
  // limitations under the License.
14
14
  import { ProfileDiffSelection_Mode, QueryRequest_Mode, QueryRequest_ReportType, Timestamp, } from '@parca/client';
15
15
  import { NewParser, ProfileType, Query } from '@parca/parser';
16
- import { formatDate } from '@parca/utilities';
16
+ import { formatDate, formatDuration } from '@parca/utilities';
17
17
  const timeFormat = (timezone) => {
18
18
  if (timezone !== undefined) {
19
19
  return 'yyyy-MM-dd HH:mm:ss';
@@ -166,7 +166,9 @@ export class MergedProfileSource {
166
166
  }
167
167
  let timePart = '';
168
168
  if (this.mergeFrom !== 0) {
169
- timePart = ` from ${formatDate(this.mergeFrom, timeFormat(timezone), timezone)} to ${formatDate(this.mergeTo, timeFormat(timezone), timezone)}`;
169
+ timePart = `over ${formatDuration({
170
+ milliseconds: this.mergeTo - this.mergeFrom,
171
+ })} from ${formatDate(this.mergeFrom, timeFormat(timezone), timezone)} to ${formatDate(this.mergeTo, timeFormat(timezone), timezone)}`;
170
172
  }
171
173
  return `merged profiles${queryPart}${timePart}`;
172
174
  }
@@ -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;CAC5B;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA0M7C,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;CAC5B;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA8M7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -103,7 +103,11 @@ const CustomSelect = ({ items, selectedKey, onSelection, placeholder, width, cla
103
103
  const styles = 'relative border rounded-md shadow-sm px-4 py-2 text-left cursor-default focus:outline-none focus:ring-1 items-center focus:ring-indigo-500 focus:border-indigo-500 text-sm flex gap-2 flex items-center justify-between';
104
104
  const defaultStyles = 'bg-white dark:bg-gray-900 dark:border-gray-600';
105
105
  const primaryStyles = 'text-gray-100 dark:gray-900 bg-indigo-600 border-indigo-500 font-medium py-2 px-4';
106
- 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: selection?.element.active ?? placeholder }), _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 h-[45px] z-10 top-[-5px] border-b border-gray-200", children: _jsx("input", { ref: searchInputRef, type: "text", className: "w-full px-6 h-full 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 => (optionRefs.current[index] = el), className: cx('relative cursor-default select-none py-2 pl-3 pr-9', index === focusedIndex && 'bg-indigo-600 text-white', item.key === selectedKey && 'bg-indigo-100 dark:bg-indigo-700', item.disabled !== null &&
106
+ 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: selection?.element.active ?? placeholder }), _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 h-[45px] z-10 top-[-5px] border-b border-gray-200", children: _jsx("input", { ref: searchInputRef, type: "text", className: "w-full px-6 h-full 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 => {
107
+ if (el !== null) {
108
+ optionRefs.current[index] = el;
109
+ }
110
+ }, className: cx('relative cursor-default select-none py-2 pl-3 pr-9', index === focusedIndex && 'bg-indigo-600 text-white', item.key === selectedKey && 'bg-indigo-100 dark:bg-indigo-700', item.disabled !== null &&
107
111
  item.disabled === true &&
108
112
  'opacity-50 cursor-not-allowed', 'focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 hover:bg-indigo-600 hover:text-white'), role: "option", "aria-selected": item.key === selectedKey, tabIndex: -1, onClick: () => {
109
113
  if (!(item.disabled ?? false)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.16.421",
3
+ "version": "0.16.423",
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": "607879f8a01750627b626e64b39347bfb7ee1d66"
76
+ "gitHead": "8ba41353d707a9cd90f0f8f9d0ba45045097c173"
77
77
  }
@@ -20,7 +20,7 @@ import {
20
20
  Timestamp,
21
21
  } from '@parca/client';
22
22
  import {Matcher, NewParser, ProfileType, Query} from '@parca/parser';
23
- import {formatDate} from '@parca/utilities';
23
+ import {formatDate, formatDuration} from '@parca/utilities';
24
24
 
25
25
  export interface ProfileSource {
26
26
  QueryRequest: () => QueryRequest;
@@ -255,11 +255,13 @@ export class MergedProfileSource implements ProfileSource {
255
255
 
256
256
  let timePart = '';
257
257
  if (this.mergeFrom !== 0) {
258
- timePart = ` from ${formatDate(
259
- this.mergeFrom,
258
+ timePart = `over ${formatDuration({
259
+ milliseconds: this.mergeTo - this.mergeFrom,
260
+ })} from ${formatDate(this.mergeFrom, timeFormat(timezone), timezone)} to ${formatDate(
261
+ this.mergeTo,
260
262
  timeFormat(timezone),
261
263
  timezone
262
- )} to ${formatDate(this.mergeTo, timeFormat(timezone), timezone)}`;
264
+ )}`;
263
265
  }
264
266
 
265
267
  return `merged profiles${queryPart}${timePart}`;
@@ -215,7 +215,11 @@ const CustomSelect: React.FC<CustomSelectProps> = ({
215
215
  filteredItems.map((item, index) => (
216
216
  <div
217
217
  key={item.key}
218
- ref={el => (optionRefs.current[index] = el)}
218
+ ref={el => {
219
+ if (el !== null) {
220
+ optionRefs.current[index] = el;
221
+ }
222
+ }}
219
223
  className={cx(
220
224
  'relative cursor-default select-none py-2 pl-3 pr-9',
221
225
  index === focusedIndex && 'bg-indigo-600 text-white',