@parca/profile 0.7.10 → 0.9.0
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 +20 -0
- package/package.json +5 -5
- package/src/IcicleGraph.tsx +2 -0
- package/src/ProfileView.tsx +8 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
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.9.0](https://github.com/parca-dev/parca/compare/ui-v0.8.3...ui-v0.9.0) (2022-02-16)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
10
|
+
## [0.8.2](https://github.com/parca-dev/parca/compare/ui-v0.8.1...ui-v0.8.2) (2022-02-14)
|
|
11
|
+
|
|
12
|
+
# [0.8.0](https://github.com/parca-dev/parca/compare/ui-v0.7.13...ui-v0.8.0) (2022-01-31)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @parca/profile
|
|
15
|
+
|
|
16
|
+
# [0.8.0](https://github.com/parca-dev/parca/compare/ui-v0.7.13...ui-v0.8.0) (2022-01-31)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package @parca/profile
|
|
19
|
+
|
|
20
|
+
## 0.7.11 (2022-01-20)
|
|
21
|
+
|
|
22
|
+
### Reverts
|
|
23
|
+
|
|
24
|
+
- Revert "ui-v0.7.1" ([7fd6652](https://github.com/parca-dev/parca/commit/7fd6652a745d222383aea0ed56aa3033d808a925))
|
|
25
|
+
|
|
6
26
|
## [0.7.10](https://github.com/yomete/parca/compare/ui-v0.7.9...ui-v0.7.10) (2022-01-19)
|
|
7
27
|
|
|
8
28
|
**Note:** Version bump only for package @parca/profile
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parca/profile",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Profile viewing libraries",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@parca/client": "^0.
|
|
7
|
-
"@parca/dynamicsize": "^0.
|
|
8
|
-
"@parca/parser": "^0.
|
|
6
|
+
"@parca/client": "^0.9.0",
|
|
7
|
+
"@parca/dynamicsize": "^0.9.0",
|
|
8
|
+
"@parca/parser": "^0.9.0",
|
|
9
9
|
"d3-scale": "^4.0.2"
|
|
10
10
|
},
|
|
11
11
|
"main": "src/index.tsx",
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
"access": "public",
|
|
20
20
|
"registry": "https://registry.npmjs.org/"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "a32bf468abe6c642b06635e435e8d491804e118c"
|
|
23
23
|
}
|
package/src/IcicleGraph.tsx
CHANGED
|
@@ -280,6 +280,7 @@ const FlamegraphNodeTooltipTableRows = ({
|
|
|
280
280
|
function generateGetBoundingClientRect(contextElement: Element, x = 0, y = 0) {
|
|
281
281
|
const domRect = contextElement.getBoundingClientRect();
|
|
282
282
|
return () =>
|
|
283
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
283
284
|
({
|
|
284
285
|
width: 0,
|
|
285
286
|
height: 0,
|
|
@@ -292,6 +293,7 @@ function generateGetBoundingClientRect(contextElement: Element, x = 0, y = 0) {
|
|
|
292
293
|
|
|
293
294
|
const virtualElement = {
|
|
294
295
|
getBoundingClientRect: () =>
|
|
296
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
295
297
|
({
|
|
296
298
|
width: 0,
|
|
297
299
|
height: 0,
|
package/src/ProfileView.tsx
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import React, {useEffect, useState
|
|
2
|
-
// import ProfileSVG from './ProfileSVG'
|
|
3
|
-
// import ProfileTop from './ProfileTop'
|
|
1
|
+
import React, {useEffect, useState} from 'react';
|
|
4
2
|
import {CalcWidth} from '@parca/dynamicsize';
|
|
5
3
|
import ProfileIcicleGraph from './ProfileIcicleGraph';
|
|
6
4
|
import {ProfileSource} from './ProfileSource';
|
|
@@ -108,6 +106,10 @@ export const ProfileView = ({queryClient, profileSource}: ProfileViewProps): JSX
|
|
|
108
106
|
error: ServiceError | null,
|
|
109
107
|
responseMessage: parca_query_v1alpha1_query_pb.QueryResponse | null
|
|
110
108
|
) => {
|
|
109
|
+
if (error != null) {
|
|
110
|
+
console.error('Error while querying', error);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
111
113
|
if (responseMessage !== null) {
|
|
112
114
|
const bytes = responseMessage.getPprof();
|
|
113
115
|
const blob = new Blob([bytes], {type: 'application/octet-stream'});
|
|
@@ -116,14 +118,14 @@ export const ProfileView = ({queryClient, profileSource}: ProfileViewProps): JSX
|
|
|
116
118
|
link.href = window.URL.createObjectURL(blob);
|
|
117
119
|
link.download = 'profile.pb.gz';
|
|
118
120
|
link.click();
|
|
121
|
+
} else {
|
|
122
|
+
console.error(error);
|
|
119
123
|
}
|
|
120
124
|
}
|
|
121
125
|
);
|
|
122
126
|
};
|
|
123
127
|
|
|
124
|
-
const resetIcicleGraph = (
|
|
125
|
-
setCurPath([]);
|
|
126
|
-
};
|
|
128
|
+
const resetIcicleGraph = () => setCurPath([]);
|
|
127
129
|
|
|
128
130
|
const setNewCurPath = (path: string[]) => {
|
|
129
131
|
if (!arrayEquals(curPath, path)) {
|