@parca/profile 0.19.140 → 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 +9 -1
- package/dist/GraphTooltipArrow/Content.js +224 -30
- package/dist/GraphTooltipArrow/DockedGraphTooltip/index.js +192 -33
- package/dist/GraphTooltipArrow/ExpandOnHoverValue.js +53 -3
- package/dist/GraphTooltipArrow/index.d.ts.map +1 -1
- package/dist/GraphTooltipArrow/index.js +86 -56
- package/dist/GraphTooltipArrow/useGraphTooltip/index.js +37 -37
- package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.js +94 -68
- package/dist/MatchersInput/SuggestionItem.js +91 -12
- package/dist/MatchersInput/SuggestionsList.d.ts +2 -1
- package/dist/MatchersInput/SuggestionsList.d.ts.map +1 -1
- package/dist/MatchersInput/SuggestionsList.js +371 -157
- package/dist/MatchersInput/SuggestionsList.test.d.ts +2 -0
- package/dist/MatchersInput/SuggestionsList.test.d.ts.map +1 -0
- package/dist/MatchersInput/index.js +308 -115
- package/dist/MetricsCircle/index.js +39 -3
- package/dist/MetricsGraph/MetricsContextMenu/index.js +119 -19
- package/dist/MetricsGraph/MetricsInfoPanel/index.js +81 -20
- package/dist/MetricsGraph/MetricsTooltip/index.d.ts.map +1 -1
- package/dist/MetricsGraph/MetricsTooltip/index.js +107 -74
- package/dist/MetricsGraph/index.js +552 -203
- package/dist/MetricsGraph/useMetricsGraphDimensions.js +46 -25
- package/dist/MetricsGraph/utils/colorMapping.js +24 -17
- package/dist/MetricsSeries/index.js +70 -7
- package/dist/PreSelectedMatchers/index.d.ts.map +1 -1
- package/dist/PreSelectedMatchers/index.js +249 -102
- package/dist/ProfileExplorer/ProfileExplorerCompare.d.ts.map +1 -1
- package/dist/ProfileExplorer/ProfileExplorerCompare.js +240 -45
- package/dist/ProfileExplorer/ProfileExplorerSingle.js +98 -11
- package/dist/ProfileExplorer/index.js +183 -32
- package/dist/ProfileFlameChart/SamplesStrips/SamplesGraph/index.js +333 -148
- package/dist/ProfileFlameChart/SamplesStrips/SamplesStrips.stories.js +69 -35
- package/dist/ProfileFlameChart/SamplesStrips/index.js +645 -134
- package/dist/ProfileFlameChart/SamplesStrips/labelSetUtils.js +114 -55
- package/dist/ProfileFlameChart/index.js +260 -126
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.js +283 -85
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenuWrapper.js +56 -20
- package/dist/ProfileFlameGraph/FlameGraphArrow/FlameGraphNodes.js +211 -140
- package/dist/ProfileFlameGraph/FlameGraphArrow/MemoizedTooltip.js +133 -38
- package/dist/ProfileFlameGraph/FlameGraphArrow/MiniMap.js +261 -216
- package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.js +71 -45
- package/dist/ProfileFlameGraph/FlameGraphArrow/TooltipContext.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/TooltipContext.js +58 -28
- package/dist/ProfileFlameGraph/FlameGraphArrow/ZoomControls.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/ZoomControls.js +59 -8
- package/dist/ProfileFlameGraph/FlameGraphArrow/index.js +396 -179
- package/dist/ProfileFlameGraph/FlameGraphArrow/useBatchedRendering.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/useBatchedRendering.js +68 -50
- package/dist/ProfileFlameGraph/FlameGraphArrow/useMappingList.js +62 -38
- package/dist/ProfileFlameGraph/FlameGraphArrow/useNodeColor.js +14 -6
- package/dist/ProfileFlameGraph/FlameGraphArrow/useScrollViewport.js +124 -82
- package/dist/ProfileFlameGraph/FlameGraphArrow/useVisibleNodes.js +160 -98
- package/dist/ProfileFlameGraph/FlameGraphArrow/useZoom.js +232 -112
- package/dist/ProfileFlameGraph/FlameGraphArrow/utils.js +137 -114
- package/dist/ProfileFlameGraph/benchmarks/benchdata/populateData.js +85 -0
- package/dist/ProfileFlameGraph/index.js +322 -147
- package/dist/ProfileMetricsGraph/hooks/useQueryRange.js +140 -32
- package/dist/ProfileMetricsGraph/index.js +515 -256
- package/dist/ProfileSelector/CompareButton.js +132 -12
- package/dist/ProfileSelector/MetricsGraphSection.js +228 -63
- package/dist/ProfileSelector/index.d.ts +1 -1
- package/dist/ProfileSelector/index.d.ts.map +1 -1
- package/dist/ProfileSelector/index.js +734 -142
- package/dist/ProfileSelector/useAutoQuerySelector.d.ts +1 -3
- package/dist/ProfileSelector/useAutoQuerySelector.d.ts.map +1 -1
- package/dist/ProfileSelector/useAutoQuerySelector.js +280 -132
- package/dist/ProfileSource.js +230 -163
- package/dist/ProfileTypeSelector/index.js +214 -125
- package/dist/ProfileView/components/ActionButtons/GroupByDropdown.js +50 -4
- package/dist/ProfileView/components/ActionButtons/SortByDropdown.js +137 -32
- package/dist/ProfileView/components/ColorStackLegend.js +182 -54
- package/dist/ProfileView/components/DashboardItems/index.js +87 -28
- package/dist/ProfileView/components/DashboardLayout/index.js +108 -16
- package/dist/ProfileView/components/DiffLegend.js +172 -29
- package/dist/ProfileView/components/GroupByLabelsDropdown/index.js +199 -55
- package/dist/ProfileView/components/InvertCallStack/index.js +97 -9
- package/dist/ProfileView/components/ProfileFilters/filterPresets.js +260 -315
- package/dist/ProfileView/components/ProfileFilters/index.js +518 -215
- package/dist/ProfileView/components/ProfileFilters/useProfileFilters.js +370 -306
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.js +191 -118
- package/dist/ProfileView/components/ProfileHeader/index.js +105 -11
- package/dist/ProfileView/components/ShareButton/ResultBox.js +119 -16
- package/dist/ProfileView/components/ShareButton/index.js +352 -62
- package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.js +664 -192
- package/dist/ProfileView/components/Toolbars/SwitchMenuItem.js +94 -7
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.js +196 -155
- package/dist/ProfileView/components/Toolbars/index.js +441 -21
- package/dist/ProfileView/components/ViewSelector/Dropdown.js +233 -22
- package/dist/ProfileView/components/ViewSelector/index.js +186 -82
- package/dist/ProfileView/components/VisualizationContainer/index.d.ts.map +1 -1
- package/dist/ProfileView/components/VisualizationContainer/index.js +52 -7
- package/dist/ProfileView/components/VisualizationPanel.js +185 -8
- package/dist/ProfileView/context/DashboardContext.js +74 -26
- package/dist/ProfileView/context/ProfileViewContext.js +56 -15
- package/dist/ProfileView/hooks/useAutoSelectDimension.js +71 -41
- package/dist/ProfileView/hooks/useProfileMetadata.js +50 -18
- package/dist/ProfileView/hooks/useResetFlameGraphState.js +31 -10
- package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.js +71 -27
- package/dist/ProfileView/hooks/useResetStateOnSeriesChange.js +53 -17
- package/dist/ProfileView/hooks/useVisualizationState.js +229 -69
- package/dist/ProfileView/index.js +383 -45
- package/dist/ProfileView/types/visualization.js +1 -13
- package/dist/ProfileView/utils/colorUtils.js +8 -7
- package/dist/ProfileViewWithData.js +319 -225
- package/dist/QueryControls/index.js +418 -47
- package/dist/Sandwich/components/CalleesSection.js +54 -4
- package/dist/Sandwich/components/CallersSection.js +97 -27
- package/dist/Sandwich/components/TableSection.js +77 -4
- package/dist/Sandwich/index.js +125 -12
- package/dist/Sandwich/utils/processRowData.js +48 -39
- package/dist/SelectWithRefresh/index.js +102 -28
- package/dist/SimpleMatchers/Select.js +520 -187
- package/dist/SimpleMatchers/index.js +590 -288
- package/dist/SourceView/Highlighter.js +230 -70
- package/dist/SourceView/LineNo.js +72 -17
- package/dist/SourceView/index.js +177 -101
- package/dist/SourceView/lang-detector/ext-to-lang.json +798 -798
- package/dist/SourceView/lang-detector/index.js +28 -14
- package/dist/SourceView/useSelectedLineRange.js +72 -20
- package/dist/Table/ColorCell.js +42 -1
- package/dist/Table/ColumnsVisibility.js +114 -6
- package/dist/Table/MoreDropdown.js +107 -21
- package/dist/Table/TableContextMenu.js +144 -134
- package/dist/Table/TableContextMenuWrapper.js +59 -14
- package/dist/Table/hooks/useColorManagement.js +58 -16
- package/dist/Table/hooks/useTableConfiguration.d.ts.map +1 -1
- package/dist/Table/hooks/useTableConfiguration.js +323 -167
- package/dist/Table/index.js +217 -123
- package/dist/Table/utils/functions.js +169 -144
- package/dist/Table/utils/topAndBottomExpandedRowModel.js +69 -52
- package/dist/TimelineGuide/index.js +209 -16
- package/dist/TopTable/benchmarks/benchdata/populateData.js +91 -0
- package/dist/TopTable/index.js +325 -121
- package/dist/contexts/LabelsQueryProvider.js +94 -32
- package/dist/contexts/UnifiedLabelsContext.js +114 -49
- package/dist/contexts/utils.js +37 -15
- package/dist/hooks/urlParsers.js +27 -15
- package/dist/hooks/useColorBy.js +47 -10
- package/dist/hooks/useCompareModeMeta.js +112 -62
- package/dist/hooks/useDashboardItems.js +52 -11
- package/dist/hooks/useLabels.js +295 -52
- package/dist/hooks/useQueryState.d.ts +1 -1
- package/dist/hooks/useQueryState.d.ts.map +1 -1
- package/dist/hooks/useQueryState.js +375 -329
- package/dist/index.js +11 -6
- package/dist/testdata/fg-diff.json +3750 -0
- package/dist/testdata/fg-simple.json +1879 -0
- package/dist/testdata/link_data.json +56 -0
- package/dist/testdata/tabular.json +30 -0
- package/dist/testdata/test_flamegraph.json +26846 -0
- package/dist/testdata/test_graph.json +53 -0
- package/dist/useDelayedLoader.js +32 -18
- package/dist/useGrpcQuery/index.js +71 -11
- package/dist/useHasProfileData.js +90 -12
- package/dist/useQuery.js +205 -64
- package/dist/useSumBy.d.ts.map +1 -1
- package/dist/useSumBy.js +294 -138
- package/dist/utils.js +62 -30
- package/package.json +9 -9
- package/src/GraphTooltipArrow/index.tsx +3 -0
- package/src/MatchersInput/SuggestionsList.test.tsx +70 -0
- package/src/MatchersInput/SuggestionsList.tsx +11 -10
- package/src/MatchersInput/index.tsx +1 -1
- package/src/MetricsGraph/MetricsTooltip/index.tsx +22 -34
- package/src/PreSelectedMatchers/index.tsx +3 -0
- package/src/ProfileExplorer/ProfileExplorerCompare.tsx +9 -2
- package/src/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.tsx +3 -0
- package/src/ProfileFlameGraph/FlameGraphArrow/TooltipContext.tsx +3 -0
- package/src/ProfileFlameGraph/FlameGraphArrow/ZoomControls.tsx +3 -0
- package/src/ProfileFlameGraph/FlameGraphArrow/useBatchedRendering.ts +3 -0
- package/src/ProfileSelector/index.tsx +31 -9
- package/src/ProfileSelector/useAutoQuerySelector.ts +64 -42
- package/src/ProfileView/components/Toolbars/MultiLevelDropdown.tsx +3 -0
- package/src/ProfileView/components/VisualizationContainer/index.tsx +3 -0
- package/src/Table/hooks/useTableConfiguration.tsx +7 -13
- package/src/hooks/useQueryState.ts +18 -3
- package/src/useDelayedLoader.ts +10 -10
- package/src/useSumBy.ts +12 -18
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.test.js +0 -455
- package/dist/hooks/useQueryState.test.js +0 -868
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
8
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
9
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
11
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
12
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
13
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
2
14
|
// Copyright 2022 The Parca Authors
|
|
3
15
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
16
|
// you may not use this file except in compliance with the License.
|
|
@@ -11,7 +23,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
11
23
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
24
|
// See the License for the specific language governing permissions and
|
|
13
25
|
// limitations under the License.
|
|
14
|
-
|
|
26
|
+
|
|
27
|
+
import React, { memo, useCallback, useDeferredValue, useEffect, useMemo, useRef, useState } from 'react';
|
|
15
28
|
import { tableFromIPC } from '@uwdata/flechette';
|
|
16
29
|
import { useContextMenu } from 'react-contexify';
|
|
17
30
|
import { FlameGraphSkeleton, SandwichFlameGraphSkeleton, useParcaContext } from '@parca/components';
|
|
@@ -31,194 +44,398 @@ import { useBatchedRendering } from './useBatchedRendering';
|
|
|
31
44
|
import { useScrollViewport } from './useScrollViewport';
|
|
32
45
|
import { useVisibleNodes } from './useVisibleNodes';
|
|
33
46
|
import { useZoom } from './useZoom';
|
|
34
|
-
import { boundsFromProfileSource, extractFeature, extractFilenameFeature, getCurrentPathFrameData, getMaxDepth, isCurrentPathFrameMatch
|
|
35
|
-
|
|
36
|
-
export
|
|
37
|
-
export
|
|
38
|
-
export
|
|
39
|
-
export
|
|
40
|
-
export
|
|
41
|
-
export
|
|
42
|
-
export
|
|
43
|
-
export
|
|
44
|
-
export
|
|
45
|
-
export
|
|
46
|
-
export
|
|
47
|
-
export
|
|
48
|
-
export
|
|
49
|
-
export
|
|
50
|
-
export
|
|
51
|
-
export
|
|
52
|
-
export
|
|
53
|
-
export
|
|
54
|
-
export
|
|
55
|
-
export
|
|
56
|
-
export
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
47
|
+
import { boundsFromProfileSource, extractFeature, extractFilenameFeature, getCurrentPathFrameData, getMaxDepth, isCurrentPathFrameMatch } from './utils';
|
|
48
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
49
|
+
export var FIELD_LABELS_ONLY = 'labels_only';
|
|
50
|
+
export var FIELD_MAPPING_FILE = 'mapping_file';
|
|
51
|
+
export var FIELD_MAPPING_BUILD_ID = 'mapping_build_id';
|
|
52
|
+
export var FIELD_LOCATION_ADDRESS = 'location_address';
|
|
53
|
+
export var FIELD_LOCATION_LINE = 'location_line';
|
|
54
|
+
export var FIELD_INLINED = 'inlined';
|
|
55
|
+
export var FIELD_TIMESTAMP = 'timestamp';
|
|
56
|
+
export var FIELD_DURATION = 'duration';
|
|
57
|
+
export var FIELD_GROUPBY_METADATA = 'groupby_metadata';
|
|
58
|
+
export var FIELD_FUNCTION_NAME = 'function_name';
|
|
59
|
+
export var FIELD_FUNCTION_SYSTEM_NAME = 'function_system_name';
|
|
60
|
+
export var FIELD_FUNCTION_FILE_NAME = 'function_file_name';
|
|
61
|
+
export var FIELD_FUNCTION_START_LINE = 'function_startline';
|
|
62
|
+
export var FIELD_CHILDREN = 'children';
|
|
63
|
+
export var FIELD_LABELS = 'labels';
|
|
64
|
+
export var FIELD_CUMULATIVE = 'cumulative';
|
|
65
|
+
export var FIELD_FLAT = 'flat';
|
|
66
|
+
export var FIELD_DIFF = 'diff';
|
|
67
|
+
export var FIELD_PARENT = 'parent';
|
|
68
|
+
export var FIELD_DEPTH = 'depth';
|
|
69
|
+
export var FIELD_VALUE_OFFSET = 'value_offset';
|
|
70
|
+
export var getMappingColors = function getMappingColors(mappingsList, isDarkMode, currentColorProfile) {
|
|
71
|
+
var mappingFeatures = mappingsList.map(function (mapping) {
|
|
72
|
+
return extractFeature(mapping);
|
|
73
|
+
});
|
|
74
|
+
var colors = {};
|
|
75
|
+
Object.entries(mappingFeatures).forEach(function (_ref) {
|
|
76
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
77
|
+
_ = _ref2[0],
|
|
78
|
+
feature = _ref2[1];
|
|
79
|
+
colors[feature.name] = getColorForFeature(feature.name, isDarkMode, currentColorProfile.colors);
|
|
80
|
+
});
|
|
81
|
+
return colors;
|
|
82
|
+
};
|
|
83
|
+
export var getFilenameColors = function getFilenameColors(filenamesList, isDarkMode, currentColorProfile) {
|
|
84
|
+
var filenameFeatures = filenamesList.map(function (filename) {
|
|
85
|
+
return extractFilenameFeature(filename);
|
|
86
|
+
});
|
|
87
|
+
var colors = {};
|
|
88
|
+
Object.entries(filenameFeatures).forEach(function (_ref3) {
|
|
89
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
90
|
+
_ = _ref4[0],
|
|
91
|
+
feature = _ref4[1];
|
|
92
|
+
colors[feature.name] = getColorForFeature(feature.name, isDarkMode, currentColorProfile.colors);
|
|
93
|
+
});
|
|
94
|
+
return colors;
|
|
63
95
|
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
96
|
+
var noop = function noop() {};
|
|
97
|
+
export var FlameGraphArrow = /*#__PURE__*/memo(function FlameGraphArrow(_ref5) {
|
|
98
|
+
var _table$getChild2;
|
|
99
|
+
var arrow = _ref5.arrow,
|
|
100
|
+
total = _ref5.total,
|
|
101
|
+
filtered = _ref5.filtered,
|
|
102
|
+
width = _ref5.width,
|
|
103
|
+
setCurPath = _ref5.setCurPath,
|
|
104
|
+
curPath = _ref5.curPath,
|
|
105
|
+
profileType = _ref5.profileType,
|
|
106
|
+
profileSource = _ref5.profileSource,
|
|
107
|
+
compareAbsolute = _ref5.compareAbsolute,
|
|
108
|
+
_ref5$isFlameChart = _ref5.isFlameChart,
|
|
109
|
+
isFlameChart = _ref5$isFlameChart === void 0 ? false : _ref5$isFlameChart,
|
|
110
|
+
_ref5$isRenderedAsFla = _ref5.isRenderedAsFlamegraph,
|
|
111
|
+
isRenderedAsFlamegraph = _ref5$isRenderedAsFla === void 0 ? false : _ref5$isRenderedAsFla,
|
|
112
|
+
_ref5$isInSandwichVie = _ref5.isInSandwichView,
|
|
113
|
+
isInSandwichView = _ref5$isInSandwichVie === void 0 ? false : _ref5$isInSandwichVie,
|
|
114
|
+
isHalfScreen = _ref5.isHalfScreen,
|
|
115
|
+
_ref5$tooltipId = _ref5.tooltipId,
|
|
116
|
+
tooltipId = _ref5$tooltipId === void 0 ? 'default' : _ref5$tooltipId,
|
|
117
|
+
maxFrameCount = _ref5.maxFrameCount,
|
|
118
|
+
_ref5$isExpanded = _ref5.isExpanded,
|
|
119
|
+
isExpanded = _ref5$isExpanded === void 0 ? false : _ref5$isExpanded,
|
|
120
|
+
mappingsListFromMetadata = _ref5.mappingsListFromMetadata,
|
|
121
|
+
filenamesListFromMetadata = _ref5.filenamesListFromMetadata,
|
|
122
|
+
colorBy = _ref5.colorBy,
|
|
123
|
+
zoomControlsRef = _ref5.zoomControlsRef;
|
|
124
|
+
var _useUserPreference = useUserPreference(USER_PREFERENCES.HIGHLIGHT_SIMILAR_STACKS.key),
|
|
125
|
+
_useUserPreference2 = _slicedToArray(_useUserPreference, 1),
|
|
126
|
+
highlightSimilarStacksPreference = _useUserPreference2[0];
|
|
127
|
+
var _useState = useState(undefined),
|
|
128
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
129
|
+
hoveringRow = _useState2[0],
|
|
130
|
+
setHoveringRow = _useState2[1];
|
|
131
|
+
var _useUserPreference3 = useUserPreference(USER_PREFERENCES.GRAPH_METAINFO_DOCKED.key),
|
|
132
|
+
_useUserPreference4 = _slicedToArray(_useUserPreference3, 1),
|
|
133
|
+
dockedMetainfo = _useUserPreference4[0];
|
|
134
|
+
var _useParcaContext = useParcaContext(),
|
|
135
|
+
perf = _useParcaContext.perf,
|
|
136
|
+
isDarkMode = _useParcaContext.isDarkMode;
|
|
137
|
+
var table = useMemo(function () {
|
|
138
|
+
var result = tableFromIPC(alignedUint8Array(arrow.record), {
|
|
139
|
+
useBigInt: true
|
|
69
140
|
});
|
|
141
|
+
if ((perf === null || perf === void 0 ? void 0 : perf.setMeasurement) != null) {
|
|
142
|
+
perf.setMeasurement('flamegraph.node_count', result.numRows);
|
|
143
|
+
}
|
|
144
|
+
return result;
|
|
145
|
+
}, [arrow, perf]);
|
|
146
|
+
var svg = useRef(null);
|
|
147
|
+
var containerRef = useRef(null);
|
|
148
|
+
var renderStartTime = useRef(0);
|
|
149
|
+
var hasInitialRenderCompleted = useRef(false);
|
|
150
|
+
var _useState3 = useState(null),
|
|
151
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
152
|
+
svgElement = _useState4[0],
|
|
153
|
+
setSvgElement = _useState4[1];
|
|
154
|
+
var _useProfileFilters = useProfileFilters(),
|
|
155
|
+
excludeBinary = _useProfileFilters.excludeBinary;
|
|
156
|
+
var _useProfileViewContex = useProfileViewContext(),
|
|
157
|
+
compareMode = _useProfileViewContex.compareMode;
|
|
158
|
+
var currentColorProfile = useCurrentColorProfile();
|
|
159
|
+
var colorForSimilarNodes = currentColorProfile.colorForSimilarNodes;
|
|
160
|
+
var colorByValue = colorBy === undefined || colorBy === '' ? 'binary' : colorBy;
|
|
161
|
+
var filenameColors = useMemo(function () {
|
|
162
|
+
var colors = getFilenameColors(filenamesListFromMetadata, isDarkMode, currentColorProfile);
|
|
70
163
|
return colors;
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}, [isDarkMode, filenamesListFromMetadata, currentColorProfile]);
|
|
99
|
-
const mappingColors = useMemo(() => {
|
|
100
|
-
const colors = getMappingColors(mappingsListFromMetadata, isDarkMode, currentColorProfile);
|
|
101
|
-
return colors;
|
|
102
|
-
}, [isDarkMode, mappingsListFromMetadata, currentColorProfile]);
|
|
103
|
-
const colorByList = {
|
|
104
|
-
filename: filenameColors,
|
|
105
|
-
binary: mappingColors,
|
|
106
|
-
};
|
|
107
|
-
const colorByColors = colorByList[colorByValue];
|
|
108
|
-
const MENU_ID = 'flame-graph-context-menu';
|
|
109
|
-
const contextMenuRef = useRef(null);
|
|
110
|
-
const { show, hideAll } = useContextMenu({
|
|
111
|
-
id: MENU_ID,
|
|
164
|
+
}, [isDarkMode, filenamesListFromMetadata, currentColorProfile]);
|
|
165
|
+
var mappingColors = useMemo(function () {
|
|
166
|
+
var colors_0 = getMappingColors(mappingsListFromMetadata, isDarkMode, currentColorProfile);
|
|
167
|
+
return colors_0;
|
|
168
|
+
}, [isDarkMode, mappingsListFromMetadata, currentColorProfile]);
|
|
169
|
+
var colorByList = {
|
|
170
|
+
filename: filenameColors,
|
|
171
|
+
binary: mappingColors
|
|
172
|
+
};
|
|
173
|
+
var colorByColors = colorByList[colorByValue];
|
|
174
|
+
var MENU_ID = 'flame-graph-context-menu';
|
|
175
|
+
var contextMenuRef = useRef(null);
|
|
176
|
+
var _useContextMenu = useContextMenu({
|
|
177
|
+
id: MENU_ID
|
|
178
|
+
}),
|
|
179
|
+
show = _useContextMenu.show,
|
|
180
|
+
hideAll = _useContextMenu.hideAll;
|
|
181
|
+
var displayMenu = useCallback(function (e, row) {
|
|
182
|
+
var _contextMenuRef$curre;
|
|
183
|
+
e.preventDefault();
|
|
184
|
+
// Race condition fix: Use callback to ensure context menu shows only after
|
|
185
|
+
// row state has been updated and propagated through the hook chain.
|
|
186
|
+
// This prevents empty function names on first click.
|
|
187
|
+
(_contextMenuRef$curre = contextMenuRef.current) === null || _contextMenuRef$curre === void 0 || _contextMenuRef$curre.setRow(row, function () {
|
|
188
|
+
show({
|
|
189
|
+
event: e
|
|
190
|
+
});
|
|
112
191
|
});
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
192
|
+
}, [show]);
|
|
193
|
+
var hideBinary = function hideBinary(binaryToRemove) {
|
|
194
|
+
// Add a new frame filter to hide this binary using the new ProfileFilters system
|
|
195
|
+
excludeBinary(binaryToRemove);
|
|
196
|
+
};
|
|
197
|
+
var handleRowClick = useCallback(function (row_0) {
|
|
198
|
+
if (isFlameChart) {
|
|
199
|
+
// In flame charts, we don't want to expand the node, so we return early.
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
// Walk down the stack starting at row until we reach the root (row 0).
|
|
203
|
+
var path = [];
|
|
204
|
+
var currentRow = row_0;
|
|
205
|
+
while (currentRow > 0) {
|
|
206
|
+
var _table$getChild$get, _table$getChild;
|
|
207
|
+
var frame = getCurrentPathFrameData(table, currentRow);
|
|
208
|
+
path.push(frame);
|
|
209
|
+
currentRow = (_table$getChild$get = (_table$getChild = table.getChild(FIELD_PARENT)) === null || _table$getChild === void 0 ? void 0 : _table$getChild.get(currentRow)) !== null && _table$getChild$get !== void 0 ? _table$getChild$get : 0;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Reverse the path so that the root is first.
|
|
213
|
+
path.reverse();
|
|
214
|
+
setCurPath(path);
|
|
215
|
+
}, [table, setCurPath, isFlameChart]);
|
|
216
|
+
var depthColumn = table.getChild(FIELD_DEPTH);
|
|
217
|
+
var maxDepth = getMaxDepth(depthColumn);
|
|
218
|
+
var rootCumulative = (_table$getChild2 = table.getChild(FIELD_CUMULATIVE)) === null || _table$getChild2 === void 0 ? void 0 : _table$getChild2.get(0);
|
|
219
|
+
var isEmptySandwichView = isInSandwichView && table.numRows > 0 && (rootCumulative === null || rootCumulative === 0n);
|
|
220
|
+
|
|
221
|
+
// Apply frame limit if maxFrameCount is provided and not expanded
|
|
222
|
+
var effectiveDepth = maxFrameCount !== undefined && !isExpanded ? Math.min(maxDepth, maxFrameCount) : maxDepth;
|
|
223
|
+
|
|
224
|
+
// Use deferred value to prevent UI blocking when expanding frames
|
|
225
|
+
var deferredEffectiveDepth = useDeferredValue(effectiveDepth);
|
|
226
|
+
var totalHeight = isInSandwichView ? deferredEffectiveDepth * RowHeight : (deferredEffectiveDepth + 1) * RowHeight;
|
|
227
|
+
|
|
228
|
+
// Get the viewport of the container, this is used to determine which rows are visible.
|
|
229
|
+
var viewport = useScrollViewport(containerRef);
|
|
230
|
+
var isZoomEnabled = isFlameChart;
|
|
231
|
+
var _useZoom = useZoom(isZoomEnabled ? containerRef : {
|
|
232
|
+
current: null
|
|
233
|
+
}),
|
|
234
|
+
zoomLevel = _useZoom.zoomLevel,
|
|
235
|
+
zoomIn = _useZoom.zoomIn,
|
|
236
|
+
zoomOut = _useZoom.zoomOut,
|
|
237
|
+
resetZoom = _useZoom.resetZoom,
|
|
238
|
+
zoomToPosition = _useZoom.zoomToPosition,
|
|
239
|
+
setZoomWithScroll = _useZoom.setZoomWithScroll,
|
|
240
|
+
scrollLeftRef = _useZoom.scrollLeftRef;
|
|
241
|
+
var zoomedWidth = isZoomEnabled ? Math.round((width !== null && width !== void 0 ? width : 1) * zoomLevel) : width !== null && width !== void 0 ? width : 0;
|
|
242
|
+
|
|
243
|
+
// Reset zoom when the data changes (e.g. new query, different time range)
|
|
244
|
+
useEffect(function () {
|
|
245
|
+
resetZoom();
|
|
246
|
+
}, [table, resetZoom]);
|
|
247
|
+
|
|
248
|
+
// To find the selected row, we must walk the current path and look at which
|
|
249
|
+
// children of the current frame matches the path element exactly. Until the
|
|
250
|
+
// end, the row we find at the end is our selected row.
|
|
251
|
+
var currentRow_0 = 0;
|
|
252
|
+
var _iterator = _createForOfIteratorHelper(curPath),
|
|
253
|
+
_step;
|
|
254
|
+
try {
|
|
255
|
+
var _loop = function _loop() {
|
|
256
|
+
var _table$getChild$get2, _table$getChild3;
|
|
257
|
+
var frame_0 = _step.value;
|
|
258
|
+
var childRows = Array.from((_table$getChild$get2 = (_table$getChild3 = table.getChild(FIELD_CHILDREN)) === null || _table$getChild3 === void 0 ? void 0 : _table$getChild3.get(currentRow_0)) !== null && _table$getChild$get2 !== void 0 ? _table$getChild$get2 : []);
|
|
171
259
|
if (childRows.length === 0) {
|
|
172
|
-
|
|
173
|
-
|
|
260
|
+
// If there are no children, we can stop here.
|
|
261
|
+
return 0; // break
|
|
174
262
|
}
|
|
175
|
-
childRows = childRows.filter(
|
|
263
|
+
childRows = childRows.filter(function (c) {
|
|
264
|
+
return isCurrentPathFrameMatch(table, c, frame_0);
|
|
265
|
+
});
|
|
176
266
|
if (childRows.length === 0) {
|
|
177
|
-
|
|
178
|
-
|
|
267
|
+
// If there are no children that match the current path frame, we can stop here.
|
|
268
|
+
return 0; // break
|
|
179
269
|
}
|
|
180
270
|
if (childRows.length > 1) {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
271
|
+
// If there are multiple children that match the current path frame, we can stop here.
|
|
272
|
+
// This is a case where the path is ambiguous and we cannot determine a single row.
|
|
273
|
+
return 0; // break
|
|
184
274
|
}
|
|
185
275
|
// If there is exactly one child that matches the current path frame, we can continue.
|
|
186
|
-
|
|
276
|
+
currentRow_0 = childRows[0];
|
|
277
|
+
},
|
|
278
|
+
_ret;
|
|
279
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
280
|
+
_ret = _loop();
|
|
281
|
+
if (_ret === 0) break;
|
|
187
282
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
283
|
+
} catch (err) {
|
|
284
|
+
_iterator.e(err);
|
|
285
|
+
} finally {
|
|
286
|
+
_iterator.f();
|
|
287
|
+
}
|
|
288
|
+
var selectedRow = currentRow_0;
|
|
289
|
+
var visibleNodes = useVisibleNodes({
|
|
290
|
+
table: table,
|
|
291
|
+
viewport: viewport,
|
|
292
|
+
total: total,
|
|
293
|
+
width: zoomedWidth,
|
|
294
|
+
selectedRow: selectedRow,
|
|
295
|
+
effectiveDepth: deferredEffectiveDepth
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
// Add nodes in incremental batches to avoid blocking the UI
|
|
299
|
+
var _useBatchedRendering = useBatchedRendering(visibleNodes, {
|
|
300
|
+
batchSize: 500
|
|
301
|
+
}),
|
|
302
|
+
batchedNodes = _useBatchedRendering.items,
|
|
303
|
+
isBatchingComplete = _useBatchedRendering.isComplete;
|
|
304
|
+
if (isBatchingComplete) {
|
|
305
|
+
hasInitialRenderCompleted.current = true;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// Show skeleton only during initial load, not during scroll updates
|
|
309
|
+
var showSkeleton = !hasInitialRenderCompleted.current && batchedNodes.length !== visibleNodes.length;
|
|
310
|
+
useEffect(function () {
|
|
311
|
+
if ((perf === null || perf === void 0 ? void 0 : perf.markInteraction) != null) {
|
|
312
|
+
renderStartTime.current = performance.now();
|
|
216
313
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
314
|
+
}, [table, width, curPath, perf]);
|
|
315
|
+
useEffect(function () {
|
|
316
|
+
setSvgElement(svg.current);
|
|
317
|
+
}, [tooltipId]);
|
|
318
|
+
if (isEmptySandwichView) {
|
|
319
|
+
return /*#__PURE__*/_jsx("div", {
|
|
320
|
+
className: "mx-auto text-center",
|
|
321
|
+
children: "No matching samples found"
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
return /*#__PURE__*/_jsx(TooltipProvider, {
|
|
325
|
+
table: table,
|
|
326
|
+
total: total,
|
|
327
|
+
totalUnfiltered: total + filtered,
|
|
328
|
+
profileType: profileType,
|
|
329
|
+
unit: arrow.unit,
|
|
330
|
+
compareAbsolute: compareAbsolute,
|
|
331
|
+
tooltipId: tooltipId,
|
|
332
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
333
|
+
className: "relative",
|
|
334
|
+
children: [isZoomEnabled && /*#__PURE__*/_jsx(ZoomControls, {
|
|
335
|
+
zoomLevel: zoomLevel,
|
|
336
|
+
zoomIn: zoomIn,
|
|
337
|
+
zoomOut: zoomOut,
|
|
338
|
+
resetZoom: resetZoom,
|
|
339
|
+
portalRef: zoomControlsRef
|
|
340
|
+
}), /*#__PURE__*/_jsx(ContextMenuWrapper, {
|
|
341
|
+
ref: contextMenuRef,
|
|
342
|
+
menuId: MENU_ID,
|
|
343
|
+
table: table,
|
|
344
|
+
total: total,
|
|
345
|
+
totalUnfiltered: total + filtered,
|
|
346
|
+
compareAbsolute: compareAbsolute,
|
|
347
|
+
resetPath: function resetPath() {
|
|
348
|
+
return setCurPath([]);
|
|
349
|
+
},
|
|
350
|
+
hideMenu: hideAll,
|
|
351
|
+
hideBinary: hideBinary,
|
|
352
|
+
unit: arrow.unit,
|
|
353
|
+
profileType: profileType,
|
|
354
|
+
isInSandwichView: isInSandwichView
|
|
355
|
+
}), /*#__PURE__*/_jsx(MemoizedTooltip, {
|
|
356
|
+
contextElement: svgElement,
|
|
357
|
+
dockedMetainfo: dockedMetainfo
|
|
358
|
+
}), showSkeleton && /*#__PURE__*/_jsx("div", {
|
|
359
|
+
className: "absolute inset-0 z-10",
|
|
360
|
+
children: isRenderedAsFlamegraph ? /*#__PURE__*/_jsx(SandwichFlameGraphSkeleton, {
|
|
361
|
+
isHalfScreen: isHalfScreen,
|
|
362
|
+
isDarkMode: isDarkMode
|
|
363
|
+
}) : /*#__PURE__*/_jsx(FlameGraphSkeleton, {
|
|
364
|
+
isHalfScreen: isHalfScreen,
|
|
365
|
+
isDarkMode: isDarkMode
|
|
366
|
+
})
|
|
367
|
+
}), isZoomEnabled && /*#__PURE__*/_jsx(MiniMap, {
|
|
368
|
+
containerRef: containerRef,
|
|
369
|
+
table: table,
|
|
370
|
+
width: width !== null && width !== void 0 ? width : 0,
|
|
371
|
+
zoomedWidth: zoomedWidth,
|
|
372
|
+
totalHeight: totalHeight,
|
|
373
|
+
maxDepth: deferredEffectiveDepth,
|
|
374
|
+
colorByColors: colorByColors,
|
|
375
|
+
colorBy: colorByValue,
|
|
376
|
+
profileSource: profileSource,
|
|
377
|
+
isDarkMode: isDarkMode,
|
|
378
|
+
scrollLeft: viewport.scrollLeft,
|
|
379
|
+
scrollLeftRef: scrollLeftRef,
|
|
380
|
+
onZoomToPosition: zoomToPosition,
|
|
381
|
+
onSetZoomWithScroll: setZoomWithScroll
|
|
382
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
383
|
+
ref: containerRef,
|
|
384
|
+
className: "".concat(isZoomEnabled ? '[scrollbar-width:none] [&::-webkit-scrollbar]:hidden' : '', " will-change-transform webkit-overflow-scrolling-touch contain ").concat(!isZoomEnabled ? 'overflow-auto' : ''),
|
|
385
|
+
style: _objectSpread(_objectSpread({
|
|
386
|
+
width: width !== null && width !== void 0 ? width : '100%'
|
|
387
|
+
}, isZoomEnabled ? {
|
|
388
|
+
overflowX: 'scroll',
|
|
389
|
+
overflowY: 'auto'
|
|
390
|
+
} : {}), {}, {
|
|
391
|
+
contain: 'layout style paint',
|
|
392
|
+
visibility: !showSkeleton ? 'visible' : 'hidden'
|
|
393
|
+
}),
|
|
394
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
395
|
+
children: [isFlameChart && /*#__PURE__*/_jsx(TimelineGuide, {
|
|
396
|
+
bounds: boundsFromProfileSource(profileSource),
|
|
397
|
+
width: zoomedWidth,
|
|
398
|
+
height: totalHeight,
|
|
399
|
+
margin: 0,
|
|
400
|
+
ticks: 12,
|
|
401
|
+
timeUnit: "nanoseconds"
|
|
402
|
+
}), /*#__PURE__*/_jsx("svg", {
|
|
403
|
+
className: "relative font-robotoMono",
|
|
404
|
+
width: zoomedWidth,
|
|
405
|
+
height: totalHeight,
|
|
406
|
+
preserveAspectRatio: "xMinYMid",
|
|
407
|
+
ref: svg,
|
|
408
|
+
children: batchedNodes.map(function (row_1) {
|
|
409
|
+
return /*#__PURE__*/_jsx(FlameNode, {
|
|
410
|
+
table: table,
|
|
411
|
+
row: row_1,
|
|
412
|
+
colors: colorByColors,
|
|
413
|
+
colorBy: colorByValue,
|
|
414
|
+
totalWidth: zoomedWidth,
|
|
415
|
+
height: RowHeight,
|
|
416
|
+
darkMode: isDarkMode,
|
|
417
|
+
compareMode: compareMode,
|
|
418
|
+
colorForSimilarNodes: colorForSimilarNodes,
|
|
419
|
+
selectedRow: selectedRow,
|
|
420
|
+
onClick: function onClick() {
|
|
421
|
+
return handleRowClick(row_1);
|
|
422
|
+
},
|
|
423
|
+
onContextMenu: displayMenu,
|
|
424
|
+
hoveringRow: highlightSimilarStacksPreference ? hoveringRow : undefined,
|
|
425
|
+
setHoveringRow: highlightSimilarStacksPreference ? setHoveringRow : noop,
|
|
426
|
+
isFlameChart: isFlameChart,
|
|
427
|
+
profileSource: profileSource,
|
|
428
|
+
isRenderedAsFlamegraph: isRenderedAsFlamegraph,
|
|
429
|
+
isInSandwichView: isInSandwichView,
|
|
430
|
+
maxDepth: maxDepth,
|
|
431
|
+
effectiveDepth: deferredEffectiveDepth,
|
|
432
|
+
tooltipId: tooltipId
|
|
433
|
+
}, row_1);
|
|
434
|
+
})
|
|
435
|
+
})]
|
|
436
|
+
})
|
|
437
|
+
})]
|
|
438
|
+
})
|
|
439
|
+
});
|
|
223
440
|
});
|
|
224
|
-
export default FlameGraphArrow;
|
|
441
|
+
export default FlameGraphArrow;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBatchedRendering.d.ts","sourceRoot":"","sources":["../../../src/ProfileFlameGraph/FlameGraphArrow/useBatchedRendering.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useBatchedRendering.d.ts","sourceRoot":"","sources":["../../../src/ProfileFlameGraph/FlameGraphArrow/useBatchedRendering.ts"],"names":[],"mappings":"AAiBA,UAAU,0BAA0B;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,yBAAyB,CAAC,CAAC;IACnC,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,UAAU,EAAE,OAAO,CAAC;CACrB;AAGD,eAAO,MAAM,mBAAmB,GAAI,CAAC,EACnC,OAAO,CAAC,EAAE,EACV,UAAS,0BAA+B,KACvC,yBAAyB,CAAC,CAAC,CAsD7B,CAAC"}
|