@parca/profile 0.16.123 → 0.16.124

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.124](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.123...@parca/profile@0.16.124) (2023-02-22)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
6
10
  ## [0.16.123](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.122...@parca/profile@0.16.123) (2023-02-22)
7
11
 
8
12
  **Note:** Version bump only for package @parca/profile
@@ -98,7 +98,7 @@ var MetricsTooltip = function (_a) {
98
98
  }, [x, y, contextElement, update]);
99
99
  var nameLabel = highlighted === null || highlighted === void 0 ? void 0 : highlighted.labels.find(function (e) { return e.name === '__name__'; });
100
100
  var highlightedNameLabel = nameLabel !== undefined ? nameLabel : { name: '', value: '' };
101
- return (_jsx("div", __assign({ ref: setPopperElement, style: styles.popper }, attributes.popper, { className: "z-10" }, { children: _jsx("div", __assign({ className: "flex max-w-md" }, { children: _jsx("div", __assign({ className: "m-auto" }, { children: _jsx("div", __assign({ className: "border-gray-300 dark:border-gray-500 bg-gray-50 dark:bg-gray-900 rounded-lg p-3 shadow-lg opacity-90", style: { borderWidth: 1 } }, { children: _jsx("div", __assign({ className: "flex flex-row" }, { children: _jsxs("div", __assign({ className: "ml-2 mr-6" }, { children: [_jsx("span", __assign({ className: "font-semibold" }, { children: highlightedNameLabel.value })), _jsx("span", __assign({ className: "block text-gray-700 dark:text-gray-300 my-2" }, { children: _jsx("table", __assign({ className: "table-auto" }, { children: _jsxs("tbody", { children: [_jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "Value" })), _jsx("td", __assign({ className: "w-3/4" }, { children: valueFormatter(highlighted.value, sampleUnit, 1) }))] }), _jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "At" })), _jsx("td", __assign({ className: "w-3/4" }, { children: formatDate(highlighted.timestamp, timeFormat) }))] })] }) })) })), _jsx("span", __assign({ className: "block text-gray-500 my-2" }, { children: highlighted.labels
101
+ return (_jsx("div", __assign({ ref: setPopperElement, style: styles.popper }, attributes.popper, { className: "z-10" }, { children: _jsx("div", __assign({ className: "flex max-w-md" }, { children: _jsx("div", __assign({ className: "m-auto" }, { children: _jsx("div", __assign({ className: "border-gray-300 dark:border-gray-500 bg-gray-50 dark:bg-gray-900 rounded-lg p-3 shadow-lg opacity-90", style: { borderWidth: 1 } }, { children: _jsx("div", __assign({ className: "flex flex-row" }, { children: _jsxs("div", __assign({ className: "ml-2 mr-6" }, { children: [_jsx("span", __assign({ className: "font-semibold" }, { children: highlightedNameLabel.value })), _jsx("span", __assign({ className: "block text-gray-700 dark:text-gray-300 my-2" }, { children: _jsx("table", __assign({ className: "table-auto" }, { children: _jsxs("tbody", { children: [_jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "Value" })), _jsx("td", __assign({ className: "w-3/4" }, { children: valueFormatter(highlighted.valuePerSecond, sampleUnit, 5) }))] }), _jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "Total" })), _jsx("td", __assign({ className: "w-3/4" }, { children: valueFormatter(highlighted.value, sampleUnit, 2) }))] }), _jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "At" })), _jsx("td", __assign({ className: "w-3/4" }, { children: formatDate(highlighted.timestamp, timeFormat) }))] })] }) })) })), _jsx("span", __assign({ className: "block text-gray-500 my-2" }, { children: highlighted.labels
102
102
  .filter(function (label) { return label.name !== '__name__'; })
103
103
  .map(function (label) {
104
104
  return (_jsx("button", __assign({ type: "button", className: "inline-block rounded-lg text-gray-700 bg-gray-200 dark:bg-gray-700 dark:text-gray-400 px-2 py-1 text-xs font-bold mr-3", onClick: function () { return onLabelClick(label.name, label.value); } }, { children: _jsx(TextWithTooltip, { text: "".concat(label.name, "=\"").concat(label.value, "\""), maxTextLength: 37, id: "tooltip-".concat(label.name, "-").concat(label.value) }) }), label.name));
@@ -17,6 +17,7 @@ export interface HighlightedSeries {
17
17
  labels: Label[];
18
18
  timestamp: number;
19
19
  value: number;
20
+ valuePerSecond: number;
20
21
  x: number;
21
22
  y: number;
22
23
  }
@@ -68,9 +68,9 @@ export var RawMetricsGraph = function (_a) {
68
68
  agg.push({
69
69
  metric: s.labelset.labels,
70
70
  values: s.samples.reduce(function (agg, d) {
71
- if (d.timestamp !== undefined && d.value !== undefined) {
71
+ if (d.timestamp !== undefined && d.valuePerSecond !== undefined) {
72
72
  var t = (+d.timestamp.seconds * 1e9 + d.timestamp.nanos) / 1e6; // https://github.com/microsoft/TypeScript/issues/5710#issuecomment-157886246
73
- agg.push([t, parseFloat(d.value)]);
73
+ agg.push([t, d.valuePerSecond, parseFloat(d.value)]);
74
74
  }
75
75
  return agg;
76
76
  }, []),
@@ -122,7 +122,8 @@ export var RawMetricsGraph = function (_a) {
122
122
  seriesIndex: closestSeriesIndex,
123
123
  labels: series[closestSeriesIndex].metric,
124
124
  timestamp: point[0],
125
- value: point[1],
125
+ valuePerSecond: point[1],
126
+ value: point[2],
126
127
  x: xScale(point[0]),
127
128
  y: yScale(point[1]),
128
129
  };
@@ -228,7 +229,8 @@ export var RawMetricsGraph = function (_a) {
228
229
  labels: [],
229
230
  seriesIndex: seriesIndex,
230
231
  timestamp: sample[0],
231
- value: sample[1],
232
+ valuePerSecond: sample[1],
233
+ value: sample[2],
232
234
  x: xScale(sample[0]),
233
235
  y: yScale(sample[1]),
234
236
  };
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.16.123",
3
+ "version": "0.16.124",
4
4
  "description": "Profile viewing libraries",
5
5
  "dependencies": {
6
- "@parca/client": "^0.16.63",
7
- "@parca/components": "^0.16.102",
6
+ "@parca/client": "^0.16.64",
7
+ "@parca/components": "^0.16.103",
8
8
  "@parca/dynamicsize": "^0.16.53",
9
- "@parca/functions": "^0.16.63",
9
+ "@parca/functions": "^0.16.64",
10
10
  "@parca/parser": "^0.16.54",
11
- "@parca/store": "^0.16.59",
11
+ "@parca/store": "^0.16.60",
12
12
  "@types/react-beautiful-dnd": "^13.1.3",
13
13
  "d3": "7.8.2",
14
14
  "d3-scale": "^4.0.2",
@@ -45,5 +45,5 @@
45
45
  "access": "public",
46
46
  "registry": "https://registry.npmjs.org/"
47
47
  },
48
- "gitHead": "4b96b1698f421e95a0b6249943140020555936b1"
48
+ "gitHead": "bcca09575ec917fdd2669a0b32b7e3b7e3757117"
49
49
  }
@@ -119,7 +119,13 @@ const MetricsTooltip = ({
119
119
  <tr>
120
120
  <td className="w-1/4">Value</td>
121
121
  <td className="w-3/4">
122
- {valueFormatter(highlighted.value, sampleUnit, 1)}
122
+ {valueFormatter(highlighted.valuePerSecond, sampleUnit, 5)}
123
+ </td>
124
+ </tr>
125
+ <tr>
126
+ <td className="w-1/4">Total</td>
127
+ <td className="w-3/4">
128
+ {valueFormatter(highlighted.value, sampleUnit, 2)}
123
129
  </td>
124
130
  </tr>
125
131
  <tr>
@@ -49,6 +49,7 @@ export interface HighlightedSeries {
49
49
  labels: Label[];
50
50
  timestamp: number;
51
51
  value: number;
52
+ valuePerSecond: number;
52
53
  x: number;
53
54
  y: number;
54
55
  }
@@ -134,9 +135,9 @@ export const RawMetricsGraph = ({
134
135
  agg.push({
135
136
  metric: s.labelset.labels,
136
137
  values: s.samples.reduce<number[][]>(function (agg: number[][], d: MetricsSample) {
137
- if (d.timestamp !== undefined && d.value !== undefined) {
138
+ if (d.timestamp !== undefined && d.valuePerSecond !== undefined) {
138
139
  const t = (+d.timestamp.seconds * 1e9 + d.timestamp.nanos) / 1e6; // https://github.com/microsoft/TypeScript/issues/5710#issuecomment-157886246
139
- agg.push([t, parseFloat(d.value)]);
140
+ agg.push([t, d.valuePerSecond, parseFloat(d.value)]);
140
141
  }
141
142
  return agg;
142
143
  }, []),
@@ -202,7 +203,8 @@ export const RawMetricsGraph = ({
202
203
  seriesIndex: closestSeriesIndex,
203
204
  labels: series[closestSeriesIndex].metric,
204
205
  timestamp: point[0],
205
- value: point[1],
206
+ valuePerSecond: point[1],
207
+ value: point[2],
206
208
  x: xScale(point[0]),
207
209
  y: yScale(point[1]),
208
210
  };
@@ -325,7 +327,8 @@ export const RawMetricsGraph = ({
325
327
  labels: [],
326
328
  seriesIndex,
327
329
  timestamp: sample[0],
328
- value: sample[1],
330
+ valuePerSecond: sample[1],
331
+ value: sample[2],
329
332
  x: xScale(sample[0]),
330
333
  y: yScale(sample[1]),
331
334
  };