@parca/profile 0.16.98 → 0.16.99

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.99](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.98...@parca/profile@0.16.99) (2023-01-19)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
6
10
  ## [0.16.98](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.97...@parca/profile@0.16.98) (2023-01-19)
7
11
 
8
12
  **Note:** Version bump only for package @parca/profile
@@ -18,7 +18,7 @@ import { useEffect, useMemo } from 'react';
18
18
  var numberFormatter = new Intl.NumberFormat('en-US');
19
19
  var ProfileIcicleGraph = function (_a) {
20
20
  var graph = _a.graph, curPath = _a.curPath, setNewCurPath = _a.setNewCurPath, sampleUnit = _a.sampleUnit, onContainerResize = _a.onContainerResize;
21
- var compareMode = Boolean(selectQueryParam('compare_a')) && Boolean(selectQueryParam('compare_b'));
21
+ var compareMode = selectQueryParam('compare_a') === 'true' && selectQueryParam('compare_b') === 'true';
22
22
  var _b = useContainerDimensions(), ref = _b.ref, dimensions = _b.dimensions;
23
23
  useEffect(function () {
24
24
  if (dimensions === undefined)
@@ -61,14 +61,14 @@ export var ProfileViewWithData = function (_a) {
61
61
  var metadata = useGrpcMetadata();
62
62
  var dashboardItems = useURLState({ param: 'dashboard_items', navigateTo: navigateTo })[0];
63
63
  var _d = useState(0), nodeTrimThreshold = _d[0], setNodeTrimThreshold = _d[1];
64
- var disableTrimming = useUserPreference(USER_PREFERENCES.DISABLE_GRAPH_TRIMMING.key)[0];
64
+ var enableTrimming = useUserPreference(USER_PREFERENCES.ENABLE_GRAPH_TRIMMING.key)[0];
65
65
  useEffect(function () {
66
- if (disableTrimming) {
66
+ if (!enableTrimming) {
67
67
  setNodeTrimThreshold(0);
68
68
  }
69
- }, [disableTrimming]);
69
+ }, [enableTrimming]);
70
70
  var onFlamegraphContainerResize = function (width) {
71
- if (disableTrimming || width === 0) {
71
+ if (!enableTrimming || width === 0) {
72
72
  return;
73
73
  }
74
74
  var threshold = (1 / width) * 100;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.16.98",
3
+ "version": "0.16.99",
4
4
  "description": "Profile viewing libraries",
5
5
  "dependencies": {
6
6
  "@parca/client": "^0.16.62",
7
- "@parca/components": "^0.16.85",
7
+ "@parca/components": "^0.16.86",
8
8
  "@parca/dynamicsize": "^0.16.52",
9
- "@parca/functions": "^0.16.57",
9
+ "@parca/functions": "^0.16.58",
10
10
  "@parca/parser": "^0.16.53",
11
11
  "@parca/store": "^0.16.52",
12
12
  "@types/react-beautiful-dnd": "^13.1.3",
@@ -44,5 +44,5 @@
44
44
  "access": "public",
45
45
  "registry": "https://registry.npmjs.org/"
46
46
  },
47
- "gitHead": "3163374b65abed3911b78d0da4f2874f64d85283"
47
+ "gitHead": "3d484f094986f967437503c9935fb7414b690fe1"
48
48
  }
@@ -40,7 +40,7 @@ const ProfileIcicleGraph = ({
40
40
  onContainerResize,
41
41
  }: ProfileIcicleGraphProps): JSX.Element => {
42
42
  const compareMode: boolean =
43
- Boolean(selectQueryParam('compare_a')) && Boolean(selectQueryParam('compare_b'));
43
+ selectQueryParam('compare_a') === 'true' && selectQueryParam('compare_b') === 'true';
44
44
  const {ref, dimensions} = useContainerDimensions();
45
45
 
46
46
  useEffect(() => {
@@ -36,16 +36,16 @@ export const ProfileViewWithData = ({
36
36
  const metadata = useGrpcMetadata();
37
37
  const [dashboardItems] = useURLState({param: 'dashboard_items', navigateTo});
38
38
  const [nodeTrimThreshold, setNodeTrimThreshold] = useState<number>(0);
39
- const [disableTrimming] = useUserPreference<boolean>(USER_PREFERENCES.DISABLE_GRAPH_TRIMMING.key);
39
+ const [enableTrimming] = useUserPreference<boolean>(USER_PREFERENCES.ENABLE_GRAPH_TRIMMING.key);
40
40
 
41
41
  useEffect(() => {
42
- if (disableTrimming) {
42
+ if (!enableTrimming) {
43
43
  setNodeTrimThreshold(0);
44
44
  }
45
- }, [disableTrimming]);
45
+ }, [enableTrimming]);
46
46
 
47
47
  const onFlamegraphContainerResize = (width: number): void => {
48
- if (disableTrimming || width === 0) {
48
+ if (!enableTrimming || width === 0) {
49
49
  return;
50
50
  }
51
51
  const threshold = (1 / width) * 100;