@parca/profile 0.19.103 → 0.19.106

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,18 @@
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.19.106](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.105...@parca/profile@0.19.106) (2025-12-18)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
10
+ ## [0.19.105](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.104...@parca/profile@0.19.105) (2025-12-18)
11
+
12
+ **Note:** Version bump only for package @parca/profile
13
+
14
+ ## [0.19.104](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.103...@parca/profile@0.19.104) (2025-12-17)
15
+
16
+ **Note:** Version bump only for package @parca/profile
17
+
6
18
  ## [0.19.103](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.102...@parca/profile@0.19.103) (2025-12-17)
7
19
 
8
20
  **Note:** Version bump only for package @parca/profile
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/MetricsGraph/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAOrF,OAAO,EAAC,aAAa,EAAkB,MAAM,mBAAmB,CAAC;AAMjE,OAA2B,EACzB,eAAe,EACf,wBAAwB,EACxB,kBAAkB,EACnB,MAAM,sBAAsB,CAAC;AAI9B,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,CAAC,YAAY,EAAE,WAAW,KAAK,IAAI,CAAC;IACnD,YAAY,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE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,EAAC,CAAC;AAE5E,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,KAAG,MAAM,GAAG,IAKnD,CAAC;AAKF,eAAO,MAAM,eAAe,GAAI,uJAc7B,KAAK,KAAG,GAAG,CAAC,OA0bd,CAAC"}
@@ -76,13 +76,7 @@ export const RawMetricsGraph = ({ data, from, to, onSampleClick, setTimeRange, y
76
76
  .range([height - margin, 0])
77
77
  .nice();
78
78
  // Create deterministic color mapping based on series IDs
79
- const color = useMemo(() => {
80
- const scale = d3.scaleOrdinal(d3.schemeCategory10);
81
- // Pre-populate the scale with sorted series IDs to ensure consistent colors
82
- const sortedIds = [...new Set(series.map(s => s.id))].sort();
83
- sortedIds.forEach(id => scale(id));
84
- return scale;
85
- }, [series]);
79
+ const color = useMemo(() => d3.scaleOrdinal(d3.schemeCategory10), []);
86
80
  const l = d3.line(d => xScale(d[0]), d => yScale(d[1]));
87
81
  const closestPoint = useMemo(() => {
88
82
  // Guard against empty series
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileMetricsGraph/index.tsx"],"names":[],"mappings":"AAkBA,OAAO,EACL,KAAK,EAGL,kBAAkB,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,aAAa,EAId,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAAyB,gBAAgB,EAAC,MAAM,IAAI,CAAC;AA6G5D,UAAU,6BAA6B;IACrC,OAAO,EAAE,MAAM,CAAC;CACjB;AAaD,eAAO,MAAM,wBAAwB,GAAI,aAAW,6BAA6B,KAAG,GAAG,CAAC,OAMvF,CAAC;AAEF,UAAU,wBAAwB;IAChC,WAAW,EAAE,kBAAkB,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,MA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AAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC7C,eAAe,EAAE,CACf,MAAM,EAAE;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,GAAG,KAAK,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC,KACvE,IAAI,CAAC;IACV,YAAY,EAAE,CACZ,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,KAAK,EAAE,EACf,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,MAAM,KACb,IAAI,CAAC;IACV,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,mBAAmB,GAAI,qHAW1B,wBAAwB,KAAG,GAAG,CAAC,OA0VjC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -245,7 +245,7 @@ const ProfileMetricsGraph = ({ queryClient, queryExpression, profile, from, to,
245
245
  }
246
246
  return _jsx(ErrorContent, { errorMessage: capitalizeOnlyFirstLetter(error.message) });
247
247
  }
248
- return (_jsx(AnimatePresence, { children: _jsxs(motion.div, { className: "h-full w-full relative", initial: { display: 'none', opacity: 0 }, animate: { display: 'block', opacity: 1 }, transition: { duration: 0.5 }, children: [isTrimmed ? (_jsxs("div", { className: "flex justify-center items-center gap-2", children: [_jsxs("span", { className: "text-sm text-amber-800 dark:text-amber-200 bg-amber-100 dark:bg-amber-900 text-center px-2 rounded", children: ["Note: Showing only ", afterTrim, " of ", new Intl.NumberFormat().format(beforeTrim), " series for performance reasons. Please narrow your query to view more."] }), _jsxs("button", { onClick: () => setShowAllSeriesForResponse(response), className: "text-sm px-1 bg-amber-600 hover:bg-amber-700 dark:bg-amber-700 dark:hover:bg-amber-600 text-white rounded font-medium transition-colors", children: ["Show all ", new Intl.NumberFormat().format(beforeTrim)] })] })) : null, loading ? (_jsx(MetricsGraphSkeleton, { heightStyle: heightStyle, isDarkMode: isDarkMode })) : dataAvailable ? (_jsx(MetricsGraph, { data: transformedSeries, from: from, to: to, setTimeRange: setTimeRange, selectedPoint: selectedPoint, onSampleClick: (closestPoint) => {
248
+ return (_jsx(AnimatePresence, { children: _jsxs(motion.div, { className: "h-full w-full relative", initial: { display: 'none', opacity: 0 }, animate: { display: 'block', opacity: 1 }, transition: { duration: 0.5 }, children: [isTrimmed ? (_jsxs("div", { className: "flex justify-center items-center gap-2", ...testId(TEST_IDS.METRICS_GRAPH_TRIMMED_BANNER), children: [_jsxs("span", { className: "text-sm text-amber-800 dark:text-amber-200 bg-amber-100 dark:bg-amber-900 text-center px-2 rounded", children: ["Note: Showing only ", afterTrim, " of ", new Intl.NumberFormat().format(beforeTrim), " series for performance reasons. Please narrow your query to view more."] }), _jsxs("button", { onClick: () => setShowAllSeriesForResponse(response), className: "text-sm px-1 bg-amber-600 hover:bg-amber-700 dark:bg-amber-700 dark:hover:bg-amber-600 text-white rounded font-medium transition-colors", ...testId(TEST_IDS.METRICS_GRAPH_SHOW_ALL_BUTTON), children: ["Show all ", new Intl.NumberFormat().format(beforeTrim)] })] })) : null, loading ? (_jsx(MetricsGraphSkeleton, { heightStyle: heightStyle, isDarkMode: isDarkMode })) : dataAvailable ? (_jsx(MetricsGraph, { data: transformedSeries, from: from, to: to, setTimeRange: setTimeRange, selectedPoint: selectedPoint, onSampleClick: (closestPoint) => {
249
249
  // Use original data for both series and point
250
250
  if (originalSeries?.[closestPoint.seriesIndex] != null) {
251
251
  const originalSeriesData = originalSeries[closestPoint.seriesIndex];
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.19.103",
3
+ "version": "0.19.106",
4
4
  "description": "Profile viewing libraries",
5
5
  "dependencies": {
6
6
  "@floating-ui/react": "^0.27.12",
7
7
  "@headlessui/react": "^1.7.19",
8
8
  "@iconify/react": "^4.0.0",
9
9
  "@parca/client": "0.17.16",
10
- "@parca/components": "0.16.392",
10
+ "@parca/components": "0.16.394",
11
11
  "@parca/dynamicsize": "0.16.72",
12
12
  "@parca/hooks": "0.0.116",
13
13
  "@parca/icons": "0.16.79",
14
14
  "@parca/parser": "0.16.86",
15
15
  "@parca/store": "0.16.199",
16
- "@parca/test-utils": "0.0.17",
16
+ "@parca/test-utils": "0.0.19",
17
17
  "@parca/utilities": "0.0.122",
18
18
  "@popperjs/core": "^2.11.8",
19
19
  "@protobuf-ts/runtime-rpc": "^2.5.0",
@@ -84,5 +84,5 @@
84
84
  "access": "public",
85
85
  "registry": "https://registry.npmjs.org/"
86
86
  },
87
- "gitHead": "14996d0bb0fdf1193c1555e4d171aefd5138303b"
87
+ "gitHead": "67e7b1d822fe860af644e378e2a741de8d31efed"
88
88
  }
@@ -188,13 +188,7 @@ export const RawMetricsGraph = ({
188
188
  .nice();
189
189
 
190
190
  // Create deterministic color mapping based on series IDs
191
- const color = useMemo(() => {
192
- const scale = d3.scaleOrdinal(d3.schemeCategory10);
193
- // Pre-populate the scale with sorted series IDs to ensure consistent colors
194
- const sortedIds = [...new Set(series.map(s => s.id))].sort();
195
- sortedIds.forEach(id => scale(id));
196
- return scale;
197
- }, [series]);
191
+ const color = useMemo(() => d3.scaleOrdinal(d3.schemeCategory10), []);
198
192
 
199
193
  const l = d3.line<[number, number]>(
200
194
  d => xScale(d[0]),
@@ -377,7 +377,10 @@ const ProfileMetricsGraph = ({
377
377
  transition={{duration: 0.5}}
378
378
  >
379
379
  {isTrimmed ? (
380
- <div className="flex justify-center items-center gap-2">
380
+ <div
381
+ className="flex justify-center items-center gap-2"
382
+ {...testId(TEST_IDS.METRICS_GRAPH_TRIMMED_BANNER)}
383
+ >
381
384
  <span className="text-sm text-amber-800 dark:text-amber-200 bg-amber-100 dark:bg-amber-900 text-center px-2 rounded">
382
385
  Note: Showing only {afterTrim} of {new Intl.NumberFormat().format(beforeTrim)} series
383
386
  for performance reasons. Please narrow your query to view more.
@@ -385,6 +388,7 @@ const ProfileMetricsGraph = ({
385
388
  <button
386
389
  onClick={() => setShowAllSeriesForResponse(response)}
387
390
  className="text-sm px-1 bg-amber-600 hover:bg-amber-700 dark:bg-amber-700 dark:hover:bg-amber-600 text-white rounded font-medium transition-colors"
391
+ {...testId(TEST_IDS.METRICS_GRAPH_SHOW_ALL_BUTTON)}
388
392
  >
389
393
  Show all {new Intl.NumberFormat().format(beforeTrim)}
390
394
  </button>