@parca/profile 0.16.492 → 0.16.494

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.494](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.493...@parca/profile@0.16.494) (2025-04-22)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
10
+ ## [0.16.493](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.492...@parca/profile@0.16.493) (2025-04-21)
11
+
12
+ **Note:** Version bump only for package @parca/profile
13
+
6
14
  ## [0.16.492](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.491...@parca/profile@0.16.492) (2025-04-09)
7
15
 
8
16
  **Note:** Version bump only for package @parca/profile
@@ -16,7 +16,8 @@ export interface CurrentPathFrame {
16
16
  lineNumber: number;
17
17
  address: string;
18
18
  inlined: boolean;
19
+ labels?: string;
19
20
  }
20
- export declare const getCurrentPathFrameData: (table: Table<any>, row: number, _level: number) => CurrentPathFrame;
21
+ export declare const getCurrentPathFrameData: (table: Table<any>, row: number, level: number) => CurrentPathFrame;
21
22
  export declare function isCurrentPathFrameMatch(table: Table<any>, row: number, level: number, b: CurrentPathFrame): boolean;
22
23
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraphArrow/utils.ts"],"names":[],"mappings":"AAaA,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAEnC,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,eAAe,EACrB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAsB,aAAa,EAAC,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAC,SAAS,EAAgB,MAAM,aAAa,CAAC;AA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LINE, FIELD_INLINED, FIELD_LA
18
18
  export function nodeLabel(table, row, level, showBinaryName) {
19
19
  const labelsOnly = table.getChild(FIELD_LABELS_ONLY)?.get(row);
20
20
  if (level === 1 && labelsOnly !== null && labelsOnly) {
21
- const labelPrefix = 'labels.';
22
- const labelColumnNames = table.schema.fields.filter(field => field.name.startsWith(labelPrefix));
23
- return labelColumnNames
24
- .map((field, i) => [
25
- labelColumnNames[i].name.slice(labelPrefix.length),
26
- arrowToString(table.getChild(field.name)?.get(row)) ?? '',
27
- ])
28
- .filter(value => value[1] !== '')
29
- .map(([k, v]) => `${k}="${v}"`)
30
- .join(', ');
21
+ return getLabelSet(table, row);
31
22
  }
32
23
  const functionName = arrowToString(table.getChild(FIELD_FUNCTION_NAME)?.get(row));
33
24
  if (functionName !== null && functionName !== '') {
@@ -93,7 +84,7 @@ export const boundsFromProfileSource = (profileSource) => {
93
84
  const end = request.options.merge.end.seconds * 1000000000n + BigInt(request.options.merge.end.nanos);
94
85
  return [start, end];
95
86
  };
96
- export const getCurrentPathFrameData = (table, row, _level) => {
87
+ export const getCurrentPathFrameData = (table, row, level) => {
97
88
  const functionName = arrowToString(table.getChild(FIELD_FUNCTION_NAME)?.get(row));
98
89
  const systemName = arrowToString(table.getChild(FIELD_FUNCTION_NAME)?.get(row));
99
90
  const fileName = arrowToString(table.getChild(FIELD_MAPPING_FILE)?.get(row));
@@ -101,6 +92,11 @@ export const getCurrentPathFrameData = (table, row, _level) => {
101
92
  const addressBigInt = table.getChild(FIELD_LOCATION_ADDRESS)?.get(row);
102
93
  const address = hexifyAddress(addressBigInt);
103
94
  const inlined = table.getChild(FIELD_INLINED)?.get(row);
95
+ const labelsOnly = table.getChild(FIELD_LABELS_ONLY)?.get(row);
96
+ let labels;
97
+ if (level === 1 && labelsOnly !== null && labelsOnly) {
98
+ labels = getLabelSet(table, row);
99
+ }
104
100
  return {
105
101
  functionName: functionName ?? '',
106
102
  systemName: systemName ?? '',
@@ -108,8 +104,21 @@ export const getCurrentPathFrameData = (table, row, _level) => {
108
104
  lineNumber: Number(lineNumber),
109
105
  address: address,
110
106
  inlined: inlined ?? false,
107
+ labels: labels ?? undefined,
111
108
  };
112
109
  };
110
+ function getLabelSet(table, row) {
111
+ const labelPrefix = 'labels.';
112
+ const labelColumnNames = table.schema.fields.filter(field => field.name.startsWith(labelPrefix));
113
+ return labelColumnNames
114
+ .map((field, i) => [
115
+ labelColumnNames[i].name.slice(labelPrefix.length),
116
+ arrowToString(table.getChild(field.name)?.get(row)) ?? '',
117
+ ])
118
+ .filter(value => value[1] !== '')
119
+ .map(([k, v]) => `${k}="${v}"`)
120
+ .join(', ');
121
+ }
113
122
  export function isCurrentPathFrameMatch(table, row, level, b) {
114
123
  const a = getCurrentPathFrameData(table, row, level);
115
124
  return (a.functionName === b.functionName &&
@@ -117,5 +126,6 @@ export function isCurrentPathFrameMatch(table, row, level, b) {
117
126
  a.fileName === b.fileName &&
118
127
  a.lineNumber === b.lineNumber &&
119
128
  a.address === b.address &&
120
- a.inlined === b.inlined);
129
+ a.inlined === b.inlined &&
130
+ a.labels === b.labels);
121
131
  }
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.16.492",
3
+ "version": "0.16.494",
4
4
  "description": "Profile viewing libraries",
5
5
  "dependencies": {
6
6
  "@headlessui/react": "^1.7.19",
7
7
  "@iconify/react": "^4.0.0",
8
- "@parca/client": "0.16.127",
9
- "@parca/components": "0.16.326",
8
+ "@parca/client": "0.16.128",
9
+ "@parca/components": "0.16.327",
10
10
  "@parca/dynamicsize": "0.16.65",
11
- "@parca/hooks": "0.0.82",
11
+ "@parca/hooks": "0.0.83",
12
12
  "@parca/icons": "0.16.71",
13
13
  "@parca/parser": "0.16.78",
14
- "@parca/store": "0.16.167",
15
- "@parca/utilities": "0.0.93",
14
+ "@parca/store": "0.16.168",
15
+ "@parca/utilities": "0.0.94",
16
16
  "@popperjs/core": "^2.11.8",
17
17
  "@protobuf-ts/runtime-rpc": "^2.5.0",
18
18
  "@storybook/preview-api": "^8.4.3",
@@ -77,5 +77,5 @@
77
77
  "access": "public",
78
78
  "registry": "https://registry.npmjs.org/"
79
79
  },
80
- "gitHead": "138b8fa2641b8798af169d4054c27e63cd8b934b"
80
+ "gitHead": "b1f6630789111e0fb5a6d21f4fd826f1ec0fcfb7"
81
81
  }
@@ -41,19 +41,7 @@ export function nodeLabel(
41
41
  ): string {
42
42
  const labelsOnly: boolean | null = table.getChild(FIELD_LABELS_ONLY)?.get(row);
43
43
  if (level === 1 && labelsOnly !== null && labelsOnly) {
44
- const labelPrefix = 'labels.';
45
- const labelColumnNames = table.schema.fields.filter(field =>
46
- field.name.startsWith(labelPrefix)
47
- );
48
-
49
- return labelColumnNames
50
- .map((field, i) => [
51
- labelColumnNames[i].name.slice(labelPrefix.length),
52
- arrowToString(table.getChild(field.name)?.get(row)) ?? '',
53
- ])
54
- .filter(value => value[1] !== '')
55
- .map(([k, v]) => `${k}="${v}"`)
56
- .join(', ');
44
+ return getLabelSet(table, row);
57
45
  }
58
46
 
59
47
  const functionName: string | null = arrowToString(table.getChild(FIELD_FUNCTION_NAME)?.get(row));
@@ -159,12 +147,13 @@ export interface CurrentPathFrame {
159
147
  lineNumber: number;
160
148
  address: string;
161
149
  inlined: boolean;
150
+ labels?: string;
162
151
  }
163
152
 
164
153
  export const getCurrentPathFrameData = (
165
154
  table: Table<any>,
166
155
  row: number,
167
- _level: number
156
+ level: number
168
157
  ): CurrentPathFrame => {
169
158
  const functionName: string | null = arrowToString(table.getChild(FIELD_FUNCTION_NAME)?.get(row));
170
159
  const systemName: string | null = arrowToString(table.getChild(FIELD_FUNCTION_NAME)?.get(row));
@@ -173,6 +162,11 @@ export const getCurrentPathFrameData = (
173
162
  const addressBigInt: bigint = table.getChild(FIELD_LOCATION_ADDRESS)?.get(row);
174
163
  const address = hexifyAddress(addressBigInt);
175
164
  const inlined: boolean | null = table.getChild(FIELD_INLINED)?.get(row);
165
+ const labelsOnly: boolean | null = table.getChild(FIELD_LABELS_ONLY)?.get(row);
166
+ let labels: undefined | string;
167
+ if (level === 1 && labelsOnly !== null && labelsOnly) {
168
+ labels = getLabelSet(table, row);
169
+ }
176
170
 
177
171
  return {
178
172
  functionName: functionName ?? '',
@@ -181,9 +175,24 @@ export const getCurrentPathFrameData = (
181
175
  lineNumber: Number(lineNumber),
182
176
  address: address,
183
177
  inlined: inlined ?? false,
178
+ labels: labels ?? undefined,
184
179
  };
185
180
  };
186
181
 
182
+ function getLabelSet(table: Table<any>, row: number): string {
183
+ const labelPrefix = 'labels.';
184
+ const labelColumnNames = table.schema.fields.filter(field => field.name.startsWith(labelPrefix));
185
+
186
+ return labelColumnNames
187
+ .map((field, i) => [
188
+ labelColumnNames[i].name.slice(labelPrefix.length),
189
+ arrowToString(table.getChild(field.name)?.get(row)) ?? '',
190
+ ])
191
+ .filter(value => value[1] !== '')
192
+ .map(([k, v]) => `${k}="${v}"`)
193
+ .join(', ');
194
+ }
195
+
187
196
  export function isCurrentPathFrameMatch(
188
197
  table: Table<any>,
189
198
  row: number,
@@ -197,6 +206,7 @@ export function isCurrentPathFrameMatch(
197
206
  a.fileName === b.fileName &&
198
207
  a.lineNumber === b.lineNumber &&
199
208
  a.address === b.address &&
200
- a.inlined === b.inlined
209
+ a.inlined === b.inlined &&
210
+ a.labels === b.labels
201
211
  );
202
212
  }