@parca/profile 0.16.246 → 0.16.248

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.248](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.247...@parca/profile@0.16.248) (2023-09-05)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
10
+ ## 0.16.247 (2023-09-05)
11
+
12
+ **Note:** Version bump only for package @parca/profile
13
+
6
14
  ## [0.16.246](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.245...@parca/profile@0.16.246) (2023-09-04)
7
15
 
8
16
  ### Bug Fixes
@@ -26,7 +26,7 @@ export function nodeLabel(table, row, level, showBinaryName) {
26
26
  return labelColumnNames
27
27
  .map((field, i) => [
28
28
  labelColumnNames[i].name.slice(pprofLabelPrefix.length),
29
- table.getChild(field.name)?.get(row) ?? '',
29
+ arrowToString(table.getChild(field.name)?.get(row)) ?? '',
30
30
  ])
31
31
  .filter(value => value[1] !== '')
32
32
  .map(([k, v]) => `${k}="${v}"`)
@@ -14,7 +14,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
14
14
  import { useEffect, useMemo, useState } from 'react';
15
15
  import { QueryRequest_ReportType } from '@parca/client';
16
16
  import { useGrpcMetadata, useParcaContext, useURLState } from '@parca/components';
17
- import { USER_PREFERENCES, useUIFeatureFlag, useUserPreference } from '@parca/hooks';
18
17
  import { saveAsBlob } from '@parca/utilities';
19
18
  import { FIELD_FUNCTION_NAME } from './ProfileIcicleGraph/IcicleGraphArrow';
20
19
  import { ProfileView } from './ProfileView';
@@ -26,26 +25,18 @@ export const ProfileViewWithData = ({ queryClient, profileSource, navigateTo, })
26
25
  const [sourceBuildID] = useURLState({ param: 'source_buildid', navigateTo });
27
26
  const [sourceFilename] = useURLState({ param: 'source_filename', navigateTo });
28
27
  const [groupBy = [FIELD_FUNCTION_NAME]] = useURLState({ param: 'group_by', navigateTo });
29
- const [enableTrimming] = useUserPreference(USER_PREFERENCES.ENABLE_GRAPH_TRIMMING.key);
30
- const [arrowFlamegraphEnabled] = useUIFeatureFlag('flamegraph-arrow');
31
28
  const [pprofDownloading, setPprofDownloading] = useState(false);
32
29
  const nodeTrimThreshold = useMemo(() => {
33
- if (!enableTrimming) {
34
- return 0;
35
- }
36
30
  let width =
37
31
  // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
38
32
  window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
39
33
  // subtract the padding
40
34
  width = width - 12 - 16 - 12;
41
35
  return (1 / width) * 100;
42
- }, [enableTrimming]);
43
- const reportType = arrowFlamegraphEnabled
44
- ? QueryRequest_ReportType.FLAMEGRAPH_ARROW
45
- : QueryRequest_ReportType.FLAMEGRAPH_TABLE;
36
+ }, []);
46
37
  // make sure we get a string[]
47
38
  const groupByParam = typeof groupBy === 'string' ? [groupBy] : groupBy;
48
- const { isLoading: flamegraphLoading, response: flamegraphResponse, error: flamegraphError, } = useQuery(queryClient, profileSource, reportType, {
39
+ const { isLoading: flamegraphLoading, response: flamegraphResponse, error: flamegraphError, } = useQuery(queryClient, profileSource, QueryRequest_ReportType.FLAMEGRAPH_ARROW, {
49
40
  skip: !dashboardItems.includes('icicle'),
50
41
  nodeTrimThreshold,
51
42
  groupBy: groupByParam,
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.16.246",
3
+ "version": "0.16.248",
4
4
  "description": "Profile viewing libraries",
5
5
  "dependencies": {
6
6
  "@parca/client": "^0.16.86",
7
- "@parca/components": "^0.16.188",
7
+ "@parca/components": "^0.16.189",
8
8
  "@parca/dynamicsize": "^0.16.54",
9
9
  "@parca/hooks": "^0.0.21",
10
10
  "@parca/parser": "^0.16.55",
@@ -49,5 +49,5 @@
49
49
  "access": "public",
50
50
  "registry": "https://registry.npmjs.org/"
51
51
  },
52
- "gitHead": "0cb4c70d5506b3a61a3f088015698f485fcaaa9f"
52
+ "gitHead": "4e814a1223712dee92ea404b87363eac778fa499"
53
53
  }
@@ -45,10 +45,10 @@ export function nodeLabel(
45
45
  return labelColumnNames
46
46
  .map((field, i) => [
47
47
  labelColumnNames[i].name.slice(pprofLabelPrefix.length),
48
- table.getChild(field.name)?.get(row) ?? '',
48
+ arrowToString(table.getChild(field.name)?.get(row)) ?? '',
49
49
  ])
50
50
  .filter(value => value[1] !== '')
51
- .map(([k, v]) => `${k as string}="${v as string}"`)
51
+ .map(([k, v]) => `${k}="${v}"`)
52
52
  .join(', ');
53
53
  }
54
54
 
@@ -15,7 +15,6 @@ import {useEffect, useMemo, useState} from 'react';
15
15
 
16
16
  import {QueryRequest_ReportType, QueryServiceClient} from '@parca/client';
17
17
  import {useGrpcMetadata, useParcaContext, useURLState} from '@parca/components';
18
- import {USER_PREFERENCES, useUIFeatureFlag, useUserPreference} from '@parca/hooks';
19
18
  import {saveAsBlob, type NavigateFunction} from '@parca/utilities';
20
19
 
21
20
  import {FIELD_FUNCTION_NAME} from './ProfileIcicleGraph/IcicleGraphArrow';
@@ -44,26 +43,16 @@ export const ProfileViewWithData = ({
44
43
  ];
45
44
  const [groupBy = [FIELD_FUNCTION_NAME]] = useURLState({param: 'group_by', navigateTo});
46
45
 
47
- const [enableTrimming] = useUserPreference<boolean>(USER_PREFERENCES.ENABLE_GRAPH_TRIMMING.key);
48
- const [arrowFlamegraphEnabled] = useUIFeatureFlag('flamegraph-arrow');
49
46
  const [pprofDownloading, setPprofDownloading] = useState<boolean>(false);
50
47
 
51
48
  const nodeTrimThreshold = useMemo(() => {
52
- if (!enableTrimming) {
53
- return 0;
54
- }
55
-
56
49
  let width =
57
50
  // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
58
51
  window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
59
52
  // subtract the padding
60
53
  width = width - 12 - 16 - 12;
61
54
  return (1 / width) * 100;
62
- }, [enableTrimming]);
63
-
64
- const reportType = arrowFlamegraphEnabled
65
- ? QueryRequest_ReportType.FLAMEGRAPH_ARROW
66
- : QueryRequest_ReportType.FLAMEGRAPH_TABLE;
55
+ }, []);
67
56
 
68
57
  // make sure we get a string[]
69
58
  const groupByParam: string[] = typeof groupBy === 'string' ? [groupBy] : groupBy;
@@ -72,7 +61,7 @@ export const ProfileViewWithData = ({
72
61
  isLoading: flamegraphLoading,
73
62
  response: flamegraphResponse,
74
63
  error: flamegraphError,
75
- } = useQuery(queryClient, profileSource, reportType, {
64
+ } = useQuery(queryClient, profileSource, QueryRequest_ReportType.FLAMEGRAPH_ARROW, {
76
65
  skip: !dashboardItems.includes('icicle'),
77
66
  nodeTrimThreshold,
78
67
  groupBy: groupByParam,