@parca/profile 0.16.148 → 0.16.150
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.150](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.149...@parca/profile@0.16.150) (2023-03-23)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
10
|
+
## 0.16.149 (2023-03-23)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @parca/profile
|
|
13
|
+
|
|
6
14
|
## [0.16.148](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.147...@parca/profile@0.16.148) (2023-03-22)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @parca/profile
|
|
@@ -65,8 +65,9 @@ export var RawMetricsGraph = function (_a) {
|
|
|
65
65
|
var marginRight = 20;
|
|
66
66
|
var series = data.reduce(function (agg, s) {
|
|
67
67
|
if (s.labelset !== undefined) {
|
|
68
|
+
var metric = s.labelset.labels.sort(function (a, b) { return a.name.localeCompare(b.name); });
|
|
68
69
|
agg.push({
|
|
69
|
-
metric:
|
|
70
|
+
metric: metric,
|
|
70
71
|
values: s.samples.reduce(function (agg, d) {
|
|
71
72
|
if (d.timestamp !== undefined && d.valuePerSecond !== undefined) {
|
|
72
73
|
var t = (+d.timestamp.seconds * 1e9 + d.timestamp.nanos) / 1e6; // https://github.com/microsoft/TypeScript/issues/5710#issuecomment-157886246
|
|
@@ -74,10 +75,13 @@ export var RawMetricsGraph = function (_a) {
|
|
|
74
75
|
}
|
|
75
76
|
return agg;
|
|
76
77
|
}, []),
|
|
78
|
+
labelset: metric.map(function (m) { return "".concat(m.name, "=").concat(m.value); }).join(','),
|
|
77
79
|
});
|
|
78
80
|
}
|
|
79
81
|
return agg;
|
|
80
82
|
}, []);
|
|
83
|
+
// Sort series by id to make sure the colors are consistent
|
|
84
|
+
series.sort(function (a, b) { return a.labelset.localeCompare(b.labelset); });
|
|
81
85
|
var extentsY = series.map(function (s) {
|
|
82
86
|
return d3.extent(s.values, function (d) {
|
|
83
87
|
return d[1];
|
|
@@ -18,6 +18,9 @@ export var getBinaryName = function (node, mappings, locations, strings) {
|
|
|
18
18
|
if (((_a = node.meta) === null || _a === void 0 ? void 0 : _a.locationIndex) === undefined || ((_b = node.meta) === null || _b === void 0 ? void 0 : _b.locationIndex) === 0) {
|
|
19
19
|
return undefined;
|
|
20
20
|
}
|
|
21
|
+
if (node.meta.locationIndex > locations.length) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
21
24
|
var location = locations[node.meta.locationIndex - 1];
|
|
22
25
|
if (location.mappingIndex === undefined || location.mappingIndex === 0) {
|
|
23
26
|
return undefined;
|
|
@@ -35,7 +38,13 @@ export function nodeLabel(node, strings, mappings, locations, functions, showBin
|
|
|
35
38
|
return '<unknown>';
|
|
36
39
|
if (((_b = node.meta) === null || _b === void 0 ? void 0 : _b.locationIndex) === 0)
|
|
37
40
|
return '<unknown>';
|
|
41
|
+
if (node.meta.locationIndex > locations.length) {
|
|
42
|
+
console.info('location index out of bounds', node.meta.locationIndex, locations.length);
|
|
43
|
+
return '<unknown>';
|
|
44
|
+
}
|
|
38
45
|
var location = locations[node.meta.locationIndex - 1];
|
|
46
|
+
if (location === undefined)
|
|
47
|
+
return '<unknown>';
|
|
39
48
|
var mappingString = '';
|
|
40
49
|
if (showBinaryName) {
|
|
41
50
|
var binary = getBinaryName(node, mappings, locations, strings);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parca/profile",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.150",
|
|
4
4
|
"description": "Profile viewing libraries",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@parca/client": "^0.16.69",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"access": "public",
|
|
47
47
|
"registry": "https://registry.npmjs.org/"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "e581eab22cd1ea35eb78e53ec1484bf3ef068093"
|
|
50
50
|
}
|
|
@@ -58,6 +58,7 @@ export interface HighlightedSeries {
|
|
|
58
58
|
interface Series {
|
|
59
59
|
metric: Label[];
|
|
60
60
|
values: number[][];
|
|
61
|
+
labelset: string;
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
const MetricsGraph = ({
|
|
@@ -133,8 +134,9 @@ export const RawMetricsGraph = ({
|
|
|
133
134
|
|
|
134
135
|
const series: Series[] = data.reduce<Series[]>(function (agg: Series[], s: MetricsSeriesPb) {
|
|
135
136
|
if (s.labelset !== undefined) {
|
|
137
|
+
const metric = s.labelset.labels.sort((a, b) => a.name.localeCompare(b.name));
|
|
136
138
|
agg.push({
|
|
137
|
-
metric
|
|
139
|
+
metric,
|
|
138
140
|
values: s.samples.reduce<number[][]>(function (agg: number[][], d: MetricsSample) {
|
|
139
141
|
if (d.timestamp !== undefined && d.valuePerSecond !== undefined) {
|
|
140
142
|
const t = (+d.timestamp.seconds * 1e9 + d.timestamp.nanos) / 1e6; // https://github.com/microsoft/TypeScript/issues/5710#issuecomment-157886246
|
|
@@ -142,11 +144,15 @@ export const RawMetricsGraph = ({
|
|
|
142
144
|
}
|
|
143
145
|
return agg;
|
|
144
146
|
}, []),
|
|
147
|
+
labelset: metric.map(m => `${m.name}=${m.value}`).join(','),
|
|
145
148
|
});
|
|
146
149
|
}
|
|
147
150
|
return agg;
|
|
148
151
|
}, []);
|
|
149
152
|
|
|
153
|
+
// Sort series by id to make sure the colors are consistent
|
|
154
|
+
series.sort((a, b) => a.labelset.localeCompare(b.labelset));
|
|
155
|
+
|
|
150
156
|
const extentsY = series.map(function (s) {
|
|
151
157
|
return d3.extent(s.values, function (d) {
|
|
152
158
|
return d[1];
|
|
@@ -31,6 +31,9 @@ export const getBinaryName = (
|
|
|
31
31
|
if (node.meta?.locationIndex === undefined || node.meta?.locationIndex === 0) {
|
|
32
32
|
return undefined;
|
|
33
33
|
}
|
|
34
|
+
if (node.meta.locationIndex > locations.length) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
34
37
|
|
|
35
38
|
const location = locations[node.meta.locationIndex - 1];
|
|
36
39
|
|
|
@@ -57,7 +60,13 @@ export function nodeLabel(
|
|
|
57
60
|
if (node.meta?.locationIndex === undefined) return '<unknown>';
|
|
58
61
|
if (node.meta?.locationIndex === 0) return '<unknown>';
|
|
59
62
|
|
|
63
|
+
if (node.meta.locationIndex > locations.length) {
|
|
64
|
+
console.info('location index out of bounds', node.meta.locationIndex, locations.length);
|
|
65
|
+
return '<unknown>';
|
|
66
|
+
}
|
|
67
|
+
|
|
60
68
|
const location = locations[node.meta.locationIndex - 1];
|
|
69
|
+
if (location === undefined) return '<unknown>';
|
|
61
70
|
|
|
62
71
|
let mappingString = '';
|
|
63
72
|
|