@parca/profile 0.8.0 → 0.8.2

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,12 @@
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.8.2](https://github.com/parca-dev/parca/compare/ui-v0.8.1...ui-v0.8.2) (2022-02-14)
7
+
8
+ # [0.8.0](https://github.com/parca-dev/parca/compare/ui-v0.7.13...ui-v0.8.0) (2022-01-31)
9
+
10
+ **Note:** Version bump only for package @parca/profile
11
+
6
12
  # [0.8.0](https://github.com/parca-dev/parca/compare/ui-v0.7.13...ui-v0.8.0) (2022-01-31)
7
13
 
8
14
  **Note:** Version bump only for package @parca/profile
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "Profile viewing libraries",
5
5
  "dependencies": {
6
6
  "@parca/client": "^0.8.0",
@@ -19,5 +19,5 @@
19
19
  "access": "public",
20
20
  "registry": "https://registry.npmjs.org/"
21
21
  },
22
- "gitHead": "b4a7d7d958a4499fae9767c81d5b990531bd0639"
22
+ "gitHead": "9eb5acc1ddd04d722fef96732d886da4f2075dca"
23
23
  }
@@ -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,
@@ -1,6 +1,4 @@
1
- import React, {useEffect, useState, useRef} from 'react';
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'});
@@ -121,7 +123,7 @@ export const ProfileView = ({queryClient, profileSource}: ProfileViewProps): JSX
121
123
  );
122
124
  };
123
125
 
124
- const resetIcicleGraph = (e: React.MouseEvent<HTMLElement>) => {
126
+ const resetIcicleGraph = (_: React.MouseEvent<HTMLElement>) => {
125
127
  setCurPath([]);
126
128
  };
127
129