@parca/profile 0.19.142 → 0.19.143
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 +4 -0
- package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.d.ts.map +1 -1
- package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.js +22 -28
- package/dist/ProfileExplorer/ProfileExplorerCompare.d.ts.map +1 -1
- package/dist/ProfileExplorer/ProfileExplorerCompare.js +72 -73
- package/dist/ProfileFlameChart/SamplesStrips/index.d.ts +2 -2
- package/dist/ProfileFlameChart/SamplesStrips/index.d.ts.map +1 -1
- package/dist/ProfileFlameChart/index.d.ts.map +1 -1
- package/dist/ProfileFlameChart/index.js +20 -24
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.js +13 -14
- package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.js +6 -5
- package/dist/ProfileFlameGraph/index.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/index.js +8 -7
- package/dist/ProfileMetricsGraph/index.d.ts.map +1 -1
- package/dist/ProfileMetricsGraph/index.js +6 -8
- package/dist/ProfileSelector/MetricsGraphSection.d.ts.map +1 -1
- package/dist/ProfileSelector/MetricsGraphSection.js +48 -55
- package/dist/ProfileSelector/index.d.ts +1 -1
- package/dist/ProfileSelector/index.d.ts.map +1 -1
- package/dist/ProfileSelector/index.js +216 -210
- package/dist/ProfileSelector/useAutoQuerySelector.d.ts +1 -3
- package/dist/ProfileSelector/useAutoQuerySelector.d.ts.map +1 -1
- package/dist/ProfileSelector/useAutoQuerySelector.js +133 -104
- package/dist/ProfileView/components/ActionButtons/SortByDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/ActionButtons/SortByDropdown.js +24 -25
- package/dist/ProfileView/components/ColorStackLegend.d.ts.map +1 -1
- package/dist/ProfileView/components/ColorStackLegend.js +3 -5
- package/dist/ProfileView/components/InvertCallStack/index.d.ts.map +1 -1
- package/dist/ProfileView/components/InvertCallStack/index.js +47 -47
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.d.ts +1 -2
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.d.ts.map +1 -1
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.js +37 -34
- package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.js +282 -294
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.js +7 -8
- package/dist/ProfileView/components/Toolbars/index.d.ts +2 -2
- package/dist/ProfileView/components/Toolbars/index.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/index.js +1 -1
- package/dist/ProfileView/components/ViewSelector/index.d.ts.map +1 -1
- package/dist/ProfileView/components/ViewSelector/index.js +53 -75
- package/dist/ProfileView/context/DashboardContext.d.ts.map +1 -1
- package/dist/ProfileView/context/DashboardContext.js +36 -44
- package/dist/ProfileView/hooks/useResetFlameGraphState.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetFlameGraphState.js +8 -7
- package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.js +59 -59
- package/dist/ProfileView/hooks/useResetStateOnSeriesChange.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetStateOnSeriesChange.js +37 -22
- package/dist/ProfileView/hooks/useVisualizationState.d.ts +3 -3
- package/dist/ProfileView/hooks/useVisualizationState.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useVisualizationState.js +116 -147
- package/dist/ProfileViewWithData.d.ts.map +1 -1
- package/dist/ProfileViewWithData.js +35 -45
- package/dist/Sandwich/index.d.ts.map +1 -1
- package/dist/Sandwich/index.js +6 -5
- package/dist/SourceView/index.d.ts.map +1 -1
- package/dist/SourceView/index.js +6 -4
- package/dist/SourceView/useSelectedLineRange.d.ts.map +1 -1
- package/dist/SourceView/useSelectedLineRange.js +52 -76
- package/dist/Table/MoreDropdown.d.ts.map +1 -1
- package/dist/Table/MoreDropdown.js +42 -53
- package/dist/Table/TableContextMenu.d.ts.map +1 -1
- package/dist/Table/TableContextMenu.js +15 -19
- package/dist/Table/hooks/useTableConfiguration.d.ts.map +1 -1
- package/dist/Table/hooks/useTableConfiguration.js +107 -115
- package/dist/Table/index.d.ts.map +1 -1
- package/dist/Table/index.js +16 -16
- package/dist/TopTable/index.d.ts.map +1 -1
- package/dist/TopTable/index.js +112 -127
- package/dist/hooks/urlParsers.d.ts +18 -0
- package/dist/hooks/urlParsers.d.ts.map +1 -0
- package/dist/hooks/urlParsers.js +44 -0
- package/dist/hooks/useColorBy.d.ts +5 -0
- package/dist/hooks/useColorBy.d.ts.map +1 -0
- package/dist/hooks/useColorBy.js +63 -0
- package/dist/hooks/useCompareModeMeta.d.ts.map +1 -1
- package/dist/hooks/useCompareModeMeta.js +94 -138
- package/dist/hooks/useDashboardItems.d.ts +5 -0
- package/dist/hooks/useDashboardItems.d.ts.map +1 -0
- package/dist/hooks/useDashboardItems.js +68 -0
- package/dist/hooks/useQueryState.d.ts +4 -4
- package/dist/hooks/useQueryState.d.ts.map +1 -1
- package/dist/hooks/useQueryState.js +127 -122
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -12
- package/dist/useSumBy.d.ts +1 -1
- package/dist/useSumBy.d.ts.map +1 -1
- package/dist/useSumBy.js +2 -2
- package/package.json +4 -3
- package/src/GraphTooltipArrow/useGraphTooltipMetaInfo/index.ts +11 -13
- package/src/ProfileExplorer/ProfileExplorerCompare.tsx +11 -9
- package/src/ProfileFlameChart/SamplesStrips/index.tsx +2 -2
- package/src/ProfileFlameChart/index.tsx +21 -28
- package/src/ProfileFlameGraph/FlameGraphArrow/ContextMenu.tsx +10 -9
- package/src/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.tsx +5 -3
- package/src/ProfileFlameGraph/index.tsx +6 -9
- package/src/ProfileMetricsGraph/index.tsx +6 -8
- package/src/ProfileSelector/MetricsGraphSection.tsx +5 -10
- package/src/ProfileSelector/index.tsx +33 -33
- package/src/ProfileSelector/useAutoQuerySelector.ts +64 -42
- package/src/ProfileView/components/ActionButtons/SortByDropdown.tsx +10 -6
- package/src/ProfileView/components/ColorStackLegend.tsx +2 -4
- package/src/ProfileView/components/InvertCallStack/index.tsx +5 -4
- package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.test.tsx +94 -192
- package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.ts +21 -21
- package/src/ProfileView/components/Toolbars/MultiLevelDropdown.tsx +24 -25
- package/src/ProfileView/components/Toolbars/TableColumnsDropdown.tsx +4 -5
- package/src/ProfileView/components/Toolbars/index.tsx +3 -3
- package/src/ProfileView/components/ViewSelector/index.tsx +9 -16
- package/src/ProfileView/context/DashboardContext.tsx +6 -6
- package/src/ProfileView/hooks/useResetFlameGraphState.ts +6 -4
- package/src/ProfileView/hooks/useResetStateOnProfileTypeChange.ts +24 -26
- package/src/ProfileView/hooks/useResetStateOnSeriesChange.ts +16 -8
- package/src/ProfileView/hooks/useVisualizationState.ts +61 -69
- package/src/ProfileViewWithData.tsx +29 -35
- package/src/Sandwich/index.tsx +4 -3
- package/src/SourceView/index.tsx +4 -2
- package/src/SourceView/useSelectedLineRange.ts +34 -19
- package/src/Table/MoreDropdown.tsx +9 -11
- package/src/Table/TableContextMenu.tsx +10 -13
- package/src/Table/hooks/useTableConfiguration.tsx +3 -4
- package/src/Table/index.tsx +12 -21
- package/src/TopTable/index.tsx +3 -4
- package/src/hooks/urlParsers.ts +38 -0
- package/src/hooks/useColorBy.ts +42 -0
- package/src/hooks/useCompareModeMeta.ts +61 -91
- package/src/hooks/useDashboardItems.ts +46 -0
- package/src/hooks/useQueryState.test.tsx +275 -345
- package/src/hooks/useQueryState.ts +153 -120
- package/src/index.tsx +16 -15
- package/src/useSumBy.ts +3 -3
|
@@ -2,7 +2,7 @@ import { CurrentPathFrame } from '../../ProfileFlameGraph/FlameGraphArrow/utils'
|
|
|
2
2
|
export declare const useVisualizationState: () => {
|
|
3
3
|
curPathArrow: CurrentPathFrame[];
|
|
4
4
|
setCurPathArrow: (path: CurrentPathFrame[]) => void;
|
|
5
|
-
colorStackLegend: string |
|
|
5
|
+
colorStackLegend: string | null;
|
|
6
6
|
colorBy: string;
|
|
7
7
|
setColorBy: (colorBy: string) => void;
|
|
8
8
|
groupBy: string[];
|
|
@@ -11,8 +11,8 @@ export declare const useVisualizationState: () => {
|
|
|
11
11
|
setGroupByLabels: (labels: string[]) => void;
|
|
12
12
|
flamechartDimension: string[];
|
|
13
13
|
setFlamechartDimension: (labels: string[]) => void;
|
|
14
|
-
sandwichFunctionName: string |
|
|
15
|
-
setSandwichFunctionName: (sandwichFunctionName: string |
|
|
14
|
+
sandwichFunctionName: string | null;
|
|
15
|
+
setSandwichFunctionName: (sandwichFunctionName: string | null) => void;
|
|
16
16
|
resetSandwichFunctionName: () => void;
|
|
17
17
|
alignFunctionName: string;
|
|
18
18
|
setAlignFunctionName: (align: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVisualizationState.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/hooks/useVisualizationState.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useVisualizationState.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/hooks/useVisualizationState.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAC,gBAAgB,EAAC,MAAM,+CAA+C,CAAC;AAU/E,eAAO,MAAM,qBAAqB,QAAO;IACvC,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,eAAe,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IACpD,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACrC,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC7C,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,sBAAsB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACnD,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,uBAAuB,EAAE,CAAC,oBAAoB,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACvE,yBAAyB,EAAE,MAAM,IAAI,CAAC;IACtC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAsH/C,CAAC"}
|
|
@@ -23,100 +23,90 @@ import { c as _c } from "react-compiler-runtime";
|
|
|
23
23
|
// limitations under the License.
|
|
24
24
|
|
|
25
25
|
import { useCallback, useMemo } from 'react';
|
|
26
|
-
import {
|
|
26
|
+
import { useQueryState } from 'nuqs';
|
|
27
27
|
import { USER_PREFERENCES, useUserPreference } from '@parca/hooks';
|
|
28
28
|
import { FIELD_FUNCTION_FILE_NAME, FIELD_FUNCTION_NAME, FIELD_LABELS, FIELD_LOCATION_ADDRESS, FIELD_MAPPING_FILE } from '../../ProfileFlameGraph/FlameGraphArrow';
|
|
29
|
+
import { flamechartDimensionParser, groupByParser, jsonParser, stringParam } from '../../hooks/urlParsers';
|
|
30
|
+
import { useColorBy } from '../../hooks/useColorBy';
|
|
29
31
|
import { useResetFlameGraphState } from './useResetFlameGraphState';
|
|
30
32
|
export var useVisualizationState = function useVisualizationState() {
|
|
31
|
-
var _ref
|
|
32
|
-
var $ = _c(
|
|
33
|
-
var _useUserPreference = useUserPreference(USER_PREFERENCES.
|
|
33
|
+
var _ref;
|
|
34
|
+
var $ = _c(42);
|
|
35
|
+
var _useUserPreference = useUserPreference(USER_PREFERENCES.ALIGN_FUNCTION_NAME.key),
|
|
34
36
|
_useUserPreference2 = _slicedToArray(_useUserPreference, 2),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
var _useUserPreference3 = useUserPreference(USER_PREFERENCES.ALIGN_FUNCTION_NAME.key),
|
|
38
|
-
_useUserPreference4 = _slicedToArray(_useUserPreference3, 2),
|
|
39
|
-
alignFunctionNamePreference = _useUserPreference4[0],
|
|
40
|
-
setAlignFunctionNamePreference = _useUserPreference4[1];
|
|
37
|
+
alignFunctionNamePreference = _useUserPreference2[0],
|
|
38
|
+
setAlignFunctionNamePreference = _useUserPreference2[1];
|
|
41
39
|
var t0;
|
|
42
40
|
if ($[0] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
43
|
-
t0 =
|
|
44
|
-
parse: JSONParser,
|
|
45
|
-
stringify: JSONSerializer,
|
|
46
|
-
defaultValue: "[]"
|
|
47
|
-
};
|
|
41
|
+
t0 = jsonParser().withDefault([]);
|
|
48
42
|
$[0] = t0;
|
|
49
43
|
} else {
|
|
50
44
|
t0 = $[0];
|
|
51
45
|
}
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
curPathArrow =
|
|
55
|
-
|
|
56
|
-
var _useURLState = useURLState("color_stack_legend"),
|
|
57
|
-
_useURLState2 = _slicedToArray(_useURLState, 1),
|
|
58
|
-
colorStackLegend = _useURLState2[0];
|
|
46
|
+
var _useQueryState = useQueryState("cur_path", t0),
|
|
47
|
+
_useQueryState2 = _slicedToArray(_useQueryState, 2),
|
|
48
|
+
curPathArrow = _useQueryState2[0],
|
|
49
|
+
setRawCurPathArrow = _useQueryState2[1];
|
|
59
50
|
var t1;
|
|
60
|
-
if ($[1] !==
|
|
61
|
-
t1 = {
|
|
62
|
-
|
|
51
|
+
if ($[1] !== setRawCurPathArrow) {
|
|
52
|
+
t1 = function t1(path) {
|
|
53
|
+
setRawCurPathArrow(path);
|
|
63
54
|
};
|
|
64
|
-
$[1] =
|
|
55
|
+
$[1] = setRawCurPathArrow;
|
|
65
56
|
$[2] = t1;
|
|
66
57
|
} else {
|
|
67
58
|
t1 = $[2];
|
|
68
59
|
}
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
60
|
+
var setCurPathArrow = t1;
|
|
61
|
+
var _useQueryState3 = useQueryState("color_stack_legend", stringParam),
|
|
62
|
+
_useQueryState4 = _slicedToArray(_useQueryState3, 1),
|
|
63
|
+
colorStackLegend = _useQueryState4[0];
|
|
64
|
+
var _useColorBy = useColorBy(),
|
|
65
|
+
colorBy = _useColorBy.colorBy,
|
|
66
|
+
setColorBy = _useColorBy.setColorBy;
|
|
67
|
+
var _useQueryState5 = useQueryState("align_function_name", stringParam),
|
|
68
|
+
_useQueryState6 = _slicedToArray(_useQueryState5, 2),
|
|
69
|
+
alignFunctionNameRaw = _useQueryState6[0],
|
|
70
|
+
setStoreAlignFunctionName = _useQueryState6[1];
|
|
71
|
+
var alignFunctionName = (_ref = alignFunctionNameRaw !== null && alignFunctionNameRaw !== void 0 ? alignFunctionNameRaw : alignFunctionNamePreference) !== null && _ref !== void 0 ? _ref : "left";
|
|
73
72
|
var t2;
|
|
74
|
-
if ($[3]
|
|
75
|
-
t2 =
|
|
76
|
-
|
|
77
|
-
};
|
|
78
|
-
$[3] = alignFunctionNamePreference;
|
|
79
|
-
$[4] = t2;
|
|
73
|
+
if ($[3] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
74
|
+
t2 = groupByParser.withDefault([FIELD_FUNCTION_NAME]);
|
|
75
|
+
$[3] = t2;
|
|
80
76
|
} else {
|
|
81
|
-
t2 = $[
|
|
77
|
+
t2 = $[3];
|
|
82
78
|
}
|
|
83
|
-
var
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
79
|
+
var _useQueryState7 = useQueryState("group_by", t2),
|
|
80
|
+
_useQueryState8 = _slicedToArray(_useQueryState7, 2),
|
|
81
|
+
groupBy = _useQueryState8[0],
|
|
82
|
+
setStoreGroupBy = _useQueryState8[1];
|
|
83
|
+
var _useQueryState9 = useQueryState("sandwich_function_name", stringParam),
|
|
84
|
+
_useQueryState0 = _slicedToArray(_useQueryState9, 2),
|
|
85
|
+
sandwichFunctionName = _useQueryState0[0],
|
|
86
|
+
setRawSandwichFunctionName = _useQueryState0[1];
|
|
87
87
|
var t3;
|
|
88
|
-
if ($[
|
|
89
|
-
t3 = {
|
|
90
|
-
|
|
91
|
-
alwaysReturnArray: true
|
|
88
|
+
if ($[4] !== setRawSandwichFunctionName) {
|
|
89
|
+
t3 = function t3(name) {
|
|
90
|
+
setRawSandwichFunctionName(name);
|
|
92
91
|
};
|
|
92
|
+
$[4] = setRawSandwichFunctionName;
|
|
93
93
|
$[5] = t3;
|
|
94
94
|
} else {
|
|
95
95
|
t3 = $[5];
|
|
96
96
|
}
|
|
97
|
-
var
|
|
98
|
-
_useURLState8 = _slicedToArray(_useURLState7, 2),
|
|
99
|
-
groupBy = _useURLState8[0],
|
|
100
|
-
setStoreGroupBy = _useURLState8[1];
|
|
101
|
-
var _useURLState9 = useURLState("sandwich_function_name"),
|
|
102
|
-
_useURLState0 = _slicedToArray(_useURLState9, 2),
|
|
103
|
-
sandwichFunctionName = _useURLState0[0],
|
|
104
|
-
setSandwichFunctionName = _useURLState0[1];
|
|
97
|
+
var setSandwichFunctionName = t3;
|
|
105
98
|
var t4;
|
|
106
99
|
if ($[6] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
107
|
-
t4 =
|
|
108
|
-
alwaysReturnArray: true
|
|
109
|
-
};
|
|
100
|
+
t4 = flamechartDimensionParser.withDefault([]);
|
|
110
101
|
$[6] = t4;
|
|
111
102
|
} else {
|
|
112
103
|
t4 = $[6];
|
|
113
104
|
}
|
|
114
|
-
var
|
|
115
|
-
|
|
116
|
-
flamechartDimension =
|
|
117
|
-
setStoreFlamechartDimension =
|
|
105
|
+
var _useQueryState1 = useQueryState("flamechart_dimension", t4),
|
|
106
|
+
_useQueryState10 = _slicedToArray(_useQueryState1, 2),
|
|
107
|
+
flamechartDimension = _useQueryState10[0],
|
|
108
|
+
setStoreFlamechartDimension = _useQueryState10[1];
|
|
118
109
|
var resetFlameGraphState = useResetFlameGraphState();
|
|
119
|
-
var batchUpdates = useURLStateBatch();
|
|
120
110
|
var t5;
|
|
121
111
|
if ($[7] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
122
112
|
t5 = [FIELD_FUNCTION_NAME, FIELD_FUNCTION_FILE_NAME, FIELD_LOCATION_ADDRESS, FIELD_MAPPING_FILE];
|
|
@@ -137,105 +127,84 @@ export var useVisualizationState = function useVisualizationState() {
|
|
|
137
127
|
}
|
|
138
128
|
var setGroupBy = t6;
|
|
139
129
|
var t7;
|
|
140
|
-
if ($[10] !==
|
|
130
|
+
if ($[10] !== groupBy || $[11] !== resetFlameGraphState || $[12] !== setGroupBy) {
|
|
141
131
|
t7 = function t7(key) {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
resetFlameGraphState();
|
|
154
|
-
});
|
|
132
|
+
if (groupBy.includes(key)) {
|
|
133
|
+
setGroupBy(groupBy.filter(function (v) {
|
|
134
|
+
return v !== key;
|
|
135
|
+
}));
|
|
136
|
+
} else {
|
|
137
|
+
var filteredGroupBy = groupBy.filter(function (item) {
|
|
138
|
+
return !levelsOfProfiling.includes(item);
|
|
139
|
+
});
|
|
140
|
+
setGroupBy([].concat(_toConsumableArray(filteredGroupBy), [key]));
|
|
141
|
+
}
|
|
142
|
+
resetFlameGraphState();
|
|
155
143
|
};
|
|
156
|
-
$[10] =
|
|
157
|
-
$[11] =
|
|
158
|
-
$[12] =
|
|
159
|
-
$[13] =
|
|
160
|
-
$[14] = t7;
|
|
144
|
+
$[10] = groupBy;
|
|
145
|
+
$[11] = resetFlameGraphState;
|
|
146
|
+
$[12] = setGroupBy;
|
|
147
|
+
$[13] = t7;
|
|
161
148
|
} else {
|
|
162
|
-
t7 = $[
|
|
149
|
+
t7 = $[13];
|
|
163
150
|
}
|
|
164
151
|
var toggleGroupBy = t7;
|
|
165
152
|
var t8;
|
|
166
|
-
if ($[
|
|
153
|
+
if ($[14] !== groupBy || $[15] !== resetFlameGraphState || $[16] !== setGroupBy) {
|
|
167
154
|
t8 = function t8(labels) {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
resetFlameGraphState();
|
|
171
|
-
});
|
|
155
|
+
setGroupBy(groupBy.filter(_temp).concat(labels));
|
|
156
|
+
resetFlameGraphState();
|
|
172
157
|
};
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
177
|
-
$[19] = t8;
|
|
158
|
+
$[14] = groupBy;
|
|
159
|
+
$[15] = resetFlameGraphState;
|
|
160
|
+
$[16] = setGroupBy;
|
|
161
|
+
$[17] = t8;
|
|
178
162
|
} else {
|
|
179
|
-
t8 = $[
|
|
163
|
+
t8 = $[17];
|
|
180
164
|
}
|
|
181
165
|
var setGroupByLabels = t8;
|
|
182
166
|
var t9;
|
|
183
|
-
if ($[
|
|
167
|
+
if ($[18] !== setStoreFlamechartDimension) {
|
|
184
168
|
t9 = function t9(labels_0) {
|
|
185
169
|
setStoreFlamechartDimension(labels_0.filter(_temp2));
|
|
186
170
|
};
|
|
187
|
-
$[
|
|
188
|
-
$[
|
|
171
|
+
$[18] = setStoreFlamechartDimension;
|
|
172
|
+
$[19] = t9;
|
|
189
173
|
} else {
|
|
190
|
-
t9 = $[
|
|
174
|
+
t9 = $[19];
|
|
191
175
|
}
|
|
192
176
|
var setFlamechartDimension = t9;
|
|
193
177
|
var t10;
|
|
194
|
-
if ($[
|
|
178
|
+
if ($[20] !== setSandwichFunctionName) {
|
|
195
179
|
t10 = function t10() {
|
|
196
|
-
setSandwichFunctionName(
|
|
180
|
+
setSandwichFunctionName(null);
|
|
197
181
|
};
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
182
|
+
$[20] = setSandwichFunctionName;
|
|
183
|
+
$[21] = t10;
|
|
200
184
|
} else {
|
|
201
|
-
t10 = $[
|
|
185
|
+
t10 = $[21];
|
|
202
186
|
}
|
|
203
187
|
var resetSandwichFunctionName = t10;
|
|
204
188
|
var t11;
|
|
205
|
-
if ($[
|
|
189
|
+
if ($[22] !== setAlignFunctionNamePreference || $[23] !== setStoreAlignFunctionName) {
|
|
206
190
|
t11 = function t11(value) {
|
|
207
|
-
|
|
208
|
-
|
|
191
|
+
setStoreAlignFunctionName(value);
|
|
192
|
+
setAlignFunctionNamePreference(value);
|
|
209
193
|
};
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
194
|
+
$[22] = setAlignFunctionNamePreference;
|
|
195
|
+
$[23] = setStoreAlignFunctionName;
|
|
196
|
+
$[24] = t11;
|
|
213
197
|
} else {
|
|
214
|
-
t11 = $[
|
|
198
|
+
t11 = $[24];
|
|
215
199
|
}
|
|
216
|
-
var
|
|
200
|
+
var setAlignFunctionName = t11;
|
|
217
201
|
var t12;
|
|
218
|
-
if ($[27] !==
|
|
219
|
-
t12 =
|
|
220
|
-
setStoreAlignFunctionName(value_0);
|
|
221
|
-
setAlignFunctionNamePreference(value_0);
|
|
222
|
-
};
|
|
223
|
-
$[27] = setAlignFunctionNamePreference;
|
|
224
|
-
$[28] = setStoreAlignFunctionName;
|
|
225
|
-
$[29] = t12;
|
|
226
|
-
} else {
|
|
227
|
-
t12 = $[29];
|
|
228
|
-
}
|
|
229
|
-
var setAlignFunctionName = t12;
|
|
230
|
-
var t13 = (_ref = colorBy) !== null && _ref !== void 0 ? _ref : "";
|
|
231
|
-
var t14 = (_ref2 = alignFunctionName) !== null && _ref2 !== void 0 ? _ref2 : "left";
|
|
232
|
-
var t15;
|
|
233
|
-
if ($[30] !== colorStackLegend || $[31] !== curPathArrow || $[32] !== flamechartDimension || $[33] !== groupBy || $[34] !== resetSandwichFunctionName || $[35] !== sandwichFunctionName || $[36] !== setAlignFunctionName || $[37] !== setColorBy || $[38] !== setCurPathArrow || $[39] !== setFlamechartDimension || $[40] !== setGroupBy || $[41] !== setGroupByLabels || $[42] !== setSandwichFunctionName || $[43] !== t13 || $[44] !== t14 || $[45] !== toggleGroupBy) {
|
|
234
|
-
t15 = {
|
|
202
|
+
if ($[25] !== alignFunctionName || $[26] !== colorBy || $[27] !== colorStackLegend || $[28] !== curPathArrow || $[29] !== flamechartDimension || $[30] !== groupBy || $[31] !== resetSandwichFunctionName || $[32] !== sandwichFunctionName || $[33] !== setAlignFunctionName || $[34] !== setColorBy || $[35] !== setCurPathArrow || $[36] !== setFlamechartDimension || $[37] !== setGroupBy || $[38] !== setGroupByLabels || $[39] !== setSandwichFunctionName || $[40] !== toggleGroupBy) {
|
|
203
|
+
t12 = {
|
|
235
204
|
curPathArrow: curPathArrow,
|
|
236
205
|
setCurPathArrow: setCurPathArrow,
|
|
237
206
|
colorStackLegend: colorStackLegend,
|
|
238
|
-
colorBy:
|
|
207
|
+
colorBy: colorBy,
|
|
239
208
|
setColorBy: setColorBy,
|
|
240
209
|
groupBy: groupBy,
|
|
241
210
|
setGroupBy: setGroupBy,
|
|
@@ -246,30 +215,30 @@ export var useVisualizationState = function useVisualizationState() {
|
|
|
246
215
|
sandwichFunctionName: sandwichFunctionName,
|
|
247
216
|
setSandwichFunctionName: setSandwichFunctionName,
|
|
248
217
|
resetSandwichFunctionName: resetSandwichFunctionName,
|
|
249
|
-
alignFunctionName:
|
|
218
|
+
alignFunctionName: alignFunctionName,
|
|
250
219
|
setAlignFunctionName: setAlignFunctionName
|
|
251
220
|
};
|
|
252
|
-
$[
|
|
253
|
-
$[
|
|
254
|
-
$[
|
|
255
|
-
$[
|
|
256
|
-
$[
|
|
257
|
-
$[
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
$[
|
|
221
|
+
$[25] = alignFunctionName;
|
|
222
|
+
$[26] = colorBy;
|
|
223
|
+
$[27] = colorStackLegend;
|
|
224
|
+
$[28] = curPathArrow;
|
|
225
|
+
$[29] = flamechartDimension;
|
|
226
|
+
$[30] = groupBy;
|
|
227
|
+
$[31] = resetSandwichFunctionName;
|
|
228
|
+
$[32] = sandwichFunctionName;
|
|
229
|
+
$[33] = setAlignFunctionName;
|
|
230
|
+
$[34] = setColorBy;
|
|
231
|
+
$[35] = setCurPathArrow;
|
|
232
|
+
$[36] = setFlamechartDimension;
|
|
233
|
+
$[37] = setGroupBy;
|
|
234
|
+
$[38] = setGroupByLabels;
|
|
235
|
+
$[39] = setSandwichFunctionName;
|
|
236
|
+
$[40] = toggleGroupBy;
|
|
237
|
+
$[41] = t12;
|
|
269
238
|
} else {
|
|
270
|
-
|
|
239
|
+
t12 = $[41];
|
|
271
240
|
}
|
|
272
|
-
return
|
|
241
|
+
return t12;
|
|
273
242
|
};
|
|
274
243
|
function _temp(l) {
|
|
275
244
|
return !l.startsWith("".concat(FIELD_LABELS, "."));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProfileViewWithData.d.ts","sourceRoot":"","sources":["../src/ProfileViewWithData.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProfileViewWithData.d.ts","sourceRoot":"","sources":["../src/ProfileViewWithData.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAA0B,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAW1E,OAAO,EAAsB,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAenE,UAAU,wBAAwB;IAChC,WAAW,EAAE,kBAAkB,CAAC;IAChC,aAAa,EAAE,aAAa,CAAC;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAC;CACvC;AAED,eAAO,MAAM,mBAAmB,GAAI,sFAKjC,wBAAwB,KAAG,GAAG,CAAC,OAmUjC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -22,8 +22,9 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
22
22
|
// limitations under the License.
|
|
23
23
|
|
|
24
24
|
import { useEffect, useMemo, useState } from 'react';
|
|
25
|
+
import { useQueryState } from 'nuqs';
|
|
25
26
|
import { QueryRequest_ReportType } from '@parca/client';
|
|
26
|
-
import {
|
|
27
|
+
import { useGrpcMetadata, useParcaContext } from '@parca/components';
|
|
27
28
|
import { saveAsBlob } from '@parca/utilities';
|
|
28
29
|
import { validateFlameChartQuery } from './ProfileFlameGraph';
|
|
29
30
|
import { FIELD_FUNCTION_NAME } from './ProfileFlameGraph/FlameGraphArrow';
|
|
@@ -31,6 +32,8 @@ import { boundsFromProfileSource } from './ProfileFlameGraph/FlameGraphArrow/uti
|
|
|
31
32
|
import { getStepCountFromScreenWidth, useQueryRange } from './ProfileMetricsGraph/hooks/useQueryRange';
|
|
32
33
|
import { ProfileView } from './ProfileView';
|
|
33
34
|
import { useProfileFilters } from './ProfileView/components/ProfileFilters/useProfileFilters';
|
|
35
|
+
import { flamechartDimensionParser, groupByParser, intParam, invertCallStackParser, stringParam } from './hooks/urlParsers';
|
|
36
|
+
import { useDashboardItems } from './hooks/useDashboardItems';
|
|
34
37
|
import { useQuery } from './useQuery';
|
|
35
38
|
import { downloadPprof } from './utils';
|
|
36
39
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -41,36 +44,27 @@ export var ProfileViewWithData = function ProfileViewWithData(_ref) {
|
|
|
41
44
|
showVisualizationSelector = _ref.showVisualizationSelector,
|
|
42
45
|
onSwitchToFifteenMinutes = _ref.onSwitchToFifteenMinutes;
|
|
43
46
|
var metadata = useGrpcMetadata();
|
|
44
|
-
var
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
var
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
var _useURLState1 = useURLState('flamechart_dimension', {
|
|
66
|
-
alwaysReturnArray: true
|
|
67
|
-
}),
|
|
68
|
-
_useURLState10 = _slicedToArray(_useURLState1, 1),
|
|
69
|
-
flamechartDimension = _useURLState10[0];
|
|
70
|
-
var _useURLState11 = useURLState('invert_call_stack'),
|
|
71
|
-
_useURLState12 = _slicedToArray(_useURLState11, 1),
|
|
72
|
-
invertStack = _useURLState12[0];
|
|
73
|
-
var invertCallStack = invertStack === 'true';
|
|
47
|
+
var _useDashboardItems = useDashboardItems(),
|
|
48
|
+
dashboardItems = _useDashboardItems.dashboardItems,
|
|
49
|
+
setDashboardItems = _useDashboardItems.setDashboardItems;
|
|
50
|
+
var _useQueryState = useQueryState('source_buildid', stringParam),
|
|
51
|
+
_useQueryState2 = _slicedToArray(_useQueryState, 1),
|
|
52
|
+
sourceBuildID = _useQueryState2[0];
|
|
53
|
+
var _useQueryState3 = useQueryState('source_filename', stringParam),
|
|
54
|
+
_useQueryState4 = _slicedToArray(_useQueryState3, 1),
|
|
55
|
+
sourceFilename = _useQueryState4[0];
|
|
56
|
+
var _useQueryState5 = useQueryState('group_by', groupByParser.withDefault([FIELD_FUNCTION_NAME])),
|
|
57
|
+
_useQueryState6 = _slicedToArray(_useQueryState5, 1),
|
|
58
|
+
groupBy = _useQueryState6[0];
|
|
59
|
+
var _useQueryState7 = useQueryState('sandwich_function_name', stringParam),
|
|
60
|
+
_useQueryState8 = _slicedToArray(_useQueryState7, 1),
|
|
61
|
+
sandwichFunctionName = _useQueryState8[0];
|
|
62
|
+
var _useQueryState9 = useQueryState('flamechart_dimension', flamechartDimensionParser),
|
|
63
|
+
_useQueryState0 = _slicedToArray(_useQueryState9, 1),
|
|
64
|
+
flamechartDimension = _useQueryState0[0];
|
|
65
|
+
var _useQueryState1 = useQueryState('invert_call_stack', invertCallStackParser),
|
|
66
|
+
_useQueryState10 = _slicedToArray(_useQueryState1, 1),
|
|
67
|
+
invertCallStack = _useQueryState10[0];
|
|
74
68
|
var _useState = useState(false),
|
|
75
69
|
_useState2 = _slicedToArray(_useState, 2),
|
|
76
70
|
pprofDownloading = _useState2[0],
|
|
@@ -109,7 +103,7 @@ export var ProfileViewWithData = function ProfileViewWithData(_ref) {
|
|
|
109
103
|
skip: !dashboardItems.includes('flamegraph'),
|
|
110
104
|
nodeTrimThreshold: nodeTrimThreshold,
|
|
111
105
|
groupBy: groupBy,
|
|
112
|
-
invertCallStack: invertCallStack,
|
|
106
|
+
invertCallStack: invertCallStack !== null && invertCallStack !== void 0 ? invertCallStack : false,
|
|
113
107
|
protoFilters: protoFilters
|
|
114
108
|
}),
|
|
115
109
|
flamegraphLoading = _useQuery.isLoading,
|
|
@@ -130,13 +124,9 @@ export var ProfileViewWithData = function ProfileViewWithData(_ref) {
|
|
|
130
124
|
}, [flamechartDimension]);
|
|
131
125
|
|
|
132
126
|
// Samples step count: 2px per data point for finer granularity in strips
|
|
133
|
-
var
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
stringify: NumberSerializer
|
|
137
|
-
}),
|
|
138
|
-
_useURLStateCustom2 = _slicedToArray(_useURLStateCustom, 1),
|
|
139
|
-
samplesStepCount = _useURLStateCustom2[0];
|
|
127
|
+
var _useQueryState11 = useQueryState('samples_step_count', intParam.withDefault(getStepCountFromScreenWidth(2))),
|
|
128
|
+
_useQueryState12 = _slicedToArray(_useQueryState11, 1),
|
|
129
|
+
samplesStepCount = _useQueryState12[0];
|
|
140
130
|
var _useQueryRange = useQueryRange(queryClient, samplesEnabled ? profileSource.query.toString() : '', samplesFromMs, samplesToMs, samplesSumBy, samplesStepCount, !samplesEnabled),
|
|
141
131
|
samplesLoading = _useQueryRange.isLoading,
|
|
142
132
|
samplesRangeResponse = _useQueryRange.response,
|
|
@@ -202,8 +192,8 @@ export var ProfileViewWithData = function ProfileViewWithData(_ref) {
|
|
|
202
192
|
tableError = _useQuery3.error;
|
|
203
193
|
var _useQuery4 = useQuery(queryClient, profileSource, QueryRequest_ReportType.SOURCE, {
|
|
204
194
|
skip: !dashboardItems.includes('source'),
|
|
205
|
-
sourceBuildID: sourceBuildID,
|
|
206
|
-
sourceFilename: sourceFilename,
|
|
195
|
+
sourceBuildID: sourceBuildID !== null && sourceBuildID !== void 0 ? sourceBuildID : undefined,
|
|
196
|
+
sourceFilename: sourceFilename !== null && sourceFilename !== void 0 ? sourceFilename : undefined,
|
|
207
197
|
protoFilters: protoFilters
|
|
208
198
|
}),
|
|
209
199
|
sourceLoading = _useQuery4.isLoading,
|
|
@@ -213,8 +203,8 @@ export var ProfileViewWithData = function ProfileViewWithData(_ref) {
|
|
|
213
203
|
nodeTrimThreshold: nodeTrimThreshold,
|
|
214
204
|
groupBy: [FIELD_FUNCTION_NAME],
|
|
215
205
|
invertCallStack: true,
|
|
216
|
-
sandwichByFunction: sandwichFunctionName,
|
|
217
|
-
skip: sandwichFunctionName
|
|
206
|
+
sandwichByFunction: sandwichFunctionName !== null && sandwichFunctionName !== void 0 ? sandwichFunctionName : undefined,
|
|
207
|
+
skip: sandwichFunctionName == null && !dashboardItems.includes('sandwich'),
|
|
218
208
|
protoFilters: protoFilters
|
|
219
209
|
}),
|
|
220
210
|
callersFlamegraphLoading = _useQuery5.isLoading,
|
|
@@ -224,8 +214,8 @@ export var ProfileViewWithData = function ProfileViewWithData(_ref) {
|
|
|
224
214
|
nodeTrimThreshold: nodeTrimThreshold,
|
|
225
215
|
groupBy: [FIELD_FUNCTION_NAME],
|
|
226
216
|
invertCallStack: false,
|
|
227
|
-
sandwichByFunction: sandwichFunctionName,
|
|
228
|
-
skip: sandwichFunctionName
|
|
217
|
+
sandwichByFunction: sandwichFunctionName !== null && sandwichFunctionName !== void 0 ? sandwichFunctionName : undefined,
|
|
218
|
+
skip: sandwichFunctionName == null && !dashboardItems.includes('sandwich'),
|
|
229
219
|
protoFilters: protoFilters
|
|
230
220
|
}),
|
|
231
221
|
calleesFlamegraphLoading = _useQuery6.isLoading,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Sandwich/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAyB,MAAM,OAAO,CAAC;AAO9C,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAC,YAAY,EAAC,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Sandwich/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAyB,MAAM,OAAO,CAAC;AAO9C,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAC,YAAY,EAAC,MAAM,oCAAoC,CAAC;AAKhE,UAAU,KAAK;IACb,aAAa,EAAE,aAAa,CAAC;IAC7B,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED,QAAA,MAAM,QAAQ,mCAuEZ,CAAC;AAEH,eAAe,QAAQ,CAAC"}
|
package/dist/Sandwich/index.js
CHANGED
|
@@ -26,10 +26,11 @@ import { c as _c } from "react-compiler-runtime";
|
|
|
26
26
|
|
|
27
27
|
import React, { useRef, useState } from 'react';
|
|
28
28
|
import { AnimatePresence, motion } from 'framer-motion';
|
|
29
|
-
import {
|
|
29
|
+
import { useQueryState } from 'nuqs';
|
|
30
30
|
import { TEST_IDS, testId } from '@parca/test-utils';
|
|
31
31
|
import { useDashboard } from '../ProfileView/context/DashboardContext';
|
|
32
32
|
import { useVisualizationState } from '../ProfileView/hooks/useVisualizationState';
|
|
33
|
+
import { stringParam } from '../hooks/urlParsers';
|
|
33
34
|
import { CalleesSection } from './components/CalleesSection';
|
|
34
35
|
import { CallersSection } from './components/CallersSection';
|
|
35
36
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -39,9 +40,9 @@ var Sandwich = /*#__PURE__*/React.memo(function Sandwich(t0) {
|
|
|
39
40
|
profileSource = t0.profileSource;
|
|
40
41
|
var _useDashboard = useDashboard(),
|
|
41
42
|
dashboardItems = _useDashboard.dashboardItems;
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
sandwichFunctionName =
|
|
43
|
+
var _useQueryState = useQueryState("sandwich_function_name", stringParam),
|
|
44
|
+
_useQueryState2 = _slicedToArray(_useQueryState, 1),
|
|
45
|
+
sandwichFunctionName = _useQueryState2[0];
|
|
45
46
|
var callersRef = React.useRef(null);
|
|
46
47
|
var calleesRef = React.useRef(null);
|
|
47
48
|
var _useState = useState(false),
|
|
@@ -95,7 +96,7 @@ var Sandwich = /*#__PURE__*/React.memo(function Sandwich(t0) {
|
|
|
95
96
|
transition: t4,
|
|
96
97
|
children: /*#__PURE__*/_jsx("div", {
|
|
97
98
|
className: "relative flex flex-row",
|
|
98
|
-
children: sandwichFunctionName
|
|
99
|
+
children: sandwichFunctionName != null ? /*#__PURE__*/_jsxs("div", {
|
|
99
100
|
className: "w-full flex flex-col",
|
|
100
101
|
ref: callersCalleesContainerRef,
|
|
101
102
|
children: [/*#__PURE__*/_jsx(CallersSection, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/SourceView/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAwC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/SourceView/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAO7D,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AASrC,UAAU,eAAe;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,KAAK,IAAI,CAAC;CACnD;AAID,eAAO,MAAM,UAAU,6CAqKrB,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
package/dist/SourceView/index.js
CHANGED
|
@@ -24,9 +24,11 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
24
24
|
import React, { useCallback, useEffect, useMemo } from 'react';
|
|
25
25
|
import { tableFromIPC } from '@uwdata/flechette';
|
|
26
26
|
import { AnimatePresence, motion } from 'framer-motion';
|
|
27
|
+
import { useQueryState } from 'nuqs';
|
|
27
28
|
import { Item, Menu, useContextMenu } from 'react-contexify';
|
|
28
|
-
import { SourceSkeleton, useParcaContext
|
|
29
|
+
import { SourceSkeleton, useParcaContext } from '@parca/components';
|
|
29
30
|
import { ExpandOnHover } from '../GraphTooltipArrow/ExpandOnHoverValue';
|
|
31
|
+
import { stringParam } from '../hooks/urlParsers';
|
|
30
32
|
import { alignedUint8Array, truncateStringReverse } from '../utils';
|
|
31
33
|
import { Highlighter, profileAwareRenderer } from './Highlighter';
|
|
32
34
|
import useLineRange from './useSelectedLineRange';
|
|
@@ -38,9 +40,9 @@ export var SourceView = /*#__PURE__*/React.memo(function SourceView(_ref) {
|
|
|
38
40
|
total = _ref.total,
|
|
39
41
|
filtered = _ref.filtered,
|
|
40
42
|
setActionButtons = _ref.setActionButtons;
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
sourceFileName =
|
|
43
|
+
var _useQueryState = useQueryState('source_filename', stringParam),
|
|
44
|
+
_useQueryState2 = _slicedToArray(_useQueryState, 1),
|
|
45
|
+
sourceFileName = _useQueryState2[0];
|
|
44
46
|
var _useParcaContext = useParcaContext(),
|
|
45
47
|
isDarkMode = _useParcaContext.isDarkMode,
|
|
46
48
|
_useParcaContext$sour = _useParcaContext.sourceViewContextMenuItems,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSelectedLineRange.d.ts","sourceRoot":"","sources":["../../src/SourceView/useSelectedLineRange.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSelectedLineRange.d.ts","sourceRoot":"","sources":["../../src/SourceView/useSelectedLineRange.ts"],"names":[],"mappings":"AAiCA,UAAU,SAAS;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACpD;AAED,QAAA,MAAM,YAAY,QAAO,SAkBxB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|