@parca/profile 0.16.473 → 0.16.474

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.474](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.473...@parca/profile@0.16.474) (2025-02-14)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
6
10
  ## [0.16.473](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.472...@parca/profile@0.16.473) (2025-02-14)
7
11
 
8
12
  **Note:** Version bump only for package @parca/profile
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/MetricsGraphStrips/index.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAGvC,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AACnC,OAAO,EAAY,SAAS,EAAC,MAAM,aAAa,CAAC;AAEjD,UAAU,KAAK;IACb,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC;IACpB,iBAAiB,CAAC,EAAE;QAClB,MAAM,EAAE,QAAQ,CAAC;QACjB,MAAM,EAAE,SAAS,CAAC;KACnB,CAAC;IACF,mBAAmB,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,GAAG,SAAS,KAAK,IAAI,CAAC;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,eAAO,MAAM,gBAAgB,cAAe,QAAQ,KAAG,MAmBtD,CAAC;AAMF,eAAO,MAAM,kBAAkB,2EAO5B,KAAK,KAAG,GAAG,CAAC,OAwDd,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/MetricsGraphStrips/index.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAGvC,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AACnC,OAAO,EAAY,SAAS,EAAC,MAAM,aAAa,CAAC;AAEjD,UAAU,KAAK;IACb,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC;IACpB,iBAAiB,CAAC,EAAE;QAClB,MAAM,EAAE,QAAQ,CAAC;QACjB,MAAM,EAAE,SAAS,CAAC;KACnB,CAAC;IACF,mBAAmB,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,GAAG,SAAS,KAAK,IAAI,CAAC;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,eAAO,MAAM,gBAAgB,cAAe,QAAQ,KAAG,MAmBtD,CAAC;AAaF,eAAO,MAAM,kBAAkB,2EAO5B,KAAK,KAAG,GAAG,CAAC,OAwDd,CAAC"}
@@ -33,8 +33,12 @@ export const labelSetToString = (labelSet) => {
33
33
  str += '}';
34
34
  return str;
35
35
  };
36
+ const STRIP_HEIGHT = 24;
36
37
  const getTimelineGuideHeight = (cpus, collapsedIndices) => {
37
- return 56 * (cpus.length - collapsedIndices.length) + 20 * collapsedIndices.length + 24;
38
+ return ((STRIP_HEIGHT + 4) * (cpus.length - collapsedIndices.length) +
39
+ 20 * collapsedIndices.length +
40
+ 24 -
41
+ 6);
38
42
  };
39
43
  export const MetricsGraphStrips = ({ cpus, data, selectedTimeframe, onSelectedTimeframe, width, bounds, }) => {
40
44
  const [collapsedIndices, setCollapsedIndices] = useState([]);
@@ -54,7 +58,7 @@ export const MetricsGraphStrips = ({ cpus, data, selectedTimeframe, onSelectedTi
54
58
  newCollapsedIndices.push(i);
55
59
  }
56
60
  setCollapsedIndices(newCollapsedIndices);
57
- }, children: [_jsx(Icon, { icon: isCollapsed ? 'bxs:right-arrow' : 'bxs:down-arrow' }), labelStr] }), !isCollapsed ? (_jsx(AreaGraph, { data: data[i], height: 24, width: width ?? 1468, fill: color(labelStr), selectionBounds: isEqual(cpu, selectedTimeframe?.labels) ? selectedTimeframe?.bounds : undefined, setSelectionBounds: bounds => {
61
+ }, children: [_jsx(Icon, { icon: isCollapsed ? 'bxs:right-arrow' : 'bxs:down-arrow' }), labelStr] }), !isCollapsed ? (_jsx(AreaGraph, { data: data[i], height: STRIP_HEIGHT, width: width ?? 1468, fill: color(labelStr), selectionBounds: isEqual(cpu, selectedTimeframe?.labels) ? selectedTimeframe?.bounds : undefined, setSelectionBounds: bounds => {
58
62
  onSelectedTimeframe(cpu, bounds);
59
63
  } })) : null] }, labelStr));
60
64
  })] }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.16.473",
3
+ "version": "0.16.474",
4
4
  "description": "Profile viewing libraries",
5
5
  "dependencies": {
6
6
  "@headlessui/react": "^1.7.19",
@@ -75,5 +75,5 @@
75
75
  "access": "public",
76
76
  "registry": "https://registry.npmjs.org/"
77
77
  },
78
- "gitHead": "ff4269eec3b42ce8c74543f01f43bfeaa11f0359"
78
+ "gitHead": "1f9e2d1c9aeacfdea6fab65ad5c6dd82abe36713"
79
79
  }
@@ -56,8 +56,15 @@ export const labelSetToString = (labelSet?: LabelSet): string => {
56
56
  return str;
57
57
  };
58
58
 
59
+ const STRIP_HEIGHT = 24;
60
+
59
61
  const getTimelineGuideHeight = (cpus: LabelSet[], collapsedIndices: number[]): number => {
60
- return 56 * (cpus.length - collapsedIndices.length) + 20 * collapsedIndices.length + 24;
62
+ return (
63
+ (STRIP_HEIGHT + 4) * (cpus.length - collapsedIndices.length) +
64
+ 20 * collapsedIndices.length +
65
+ 24 -
66
+ 6
67
+ );
61
68
  };
62
69
 
63
70
  export const MetricsGraphStrips = ({
@@ -107,7 +114,7 @@ export const MetricsGraphStrips = ({
107
114
  {!isCollapsed ? (
108
115
  <AreaGraph
109
116
  data={data[i]}
110
- height={24}
117
+ height={STRIP_HEIGHT}
111
118
  width={width ?? 1468}
112
119
  fill={color(labelStr) as string}
113
120
  selectionBounds={