@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,13 @@
|
|
|
1
|
-
|
|
1
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
2
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
3
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
4
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
5
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
6
|
+
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."); }
|
|
7
|
+
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; } }
|
|
8
|
+
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; }
|
|
9
|
+
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; } }
|
|
10
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
2
11
|
// Copyright 2022 The Parca Authors
|
|
3
12
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
13
|
// you may not use this file except in compliance with the License.
|
|
@@ -11,6 +20,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
11
20
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
21
|
// See the License for the specific language governing permissions and
|
|
13
22
|
// limitations under the License.
|
|
23
|
+
|
|
14
24
|
import { useEffect, useMemo, useState } from 'react';
|
|
15
25
|
import { useQueryState } from 'nuqs';
|
|
16
26
|
import { QueryRequest_ReportType } from '@parca/client';
|
|
@@ -19,240 +29,324 @@ import { saveAsBlob } from '@parca/utilities';
|
|
|
19
29
|
import { validateFlameChartQuery } from './ProfileFlameGraph';
|
|
20
30
|
import { FIELD_FUNCTION_NAME } from './ProfileFlameGraph/FlameGraphArrow';
|
|
21
31
|
import { boundsFromProfileSource } from './ProfileFlameGraph/FlameGraphArrow/utils';
|
|
22
|
-
import { getStepCountFromScreenWidth, useQueryRange
|
|
32
|
+
import { getStepCountFromScreenWidth, useQueryRange } from './ProfileMetricsGraph/hooks/useQueryRange';
|
|
23
33
|
import { ProfileView } from './ProfileView';
|
|
24
34
|
import { useProfileFilters } from './ProfileView/components/ProfileFilters/useProfileFilters';
|
|
25
|
-
import { flamechartDimensionParser, groupByParser, intParam, invertCallStackParser, stringParam
|
|
35
|
+
import { flamechartDimensionParser, groupByParser, intParam, invertCallStackParser, stringParam } from './hooks/urlParsers';
|
|
26
36
|
import { useDashboardItems } from './hooks/useDashboardItems';
|
|
27
37
|
import { useQuery } from './useQuery';
|
|
28
38
|
import { downloadPprof } from './utils';
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
protoFilters,
|
|
114
|
-
});
|
|
115
|
-
const { isLoading: sourceLoading, response: sourceResponse, error: sourceError, } = useQuery(queryClient, profileSource, QueryRequest_ReportType.SOURCE, {
|
|
116
|
-
skip: !dashboardItems.includes('source'),
|
|
117
|
-
sourceBuildID: sourceBuildID ?? undefined,
|
|
118
|
-
sourceFilename: sourceFilename ?? undefined,
|
|
119
|
-
protoFilters,
|
|
120
|
-
});
|
|
121
|
-
const { isLoading: callersFlamegraphLoading, response: callersFlamegraphResponse, error: callersFlamegraphError, } = useQuery(queryClient, profileSource, QueryRequest_ReportType.FLAMEGRAPH_ARROW, {
|
|
122
|
-
nodeTrimThreshold,
|
|
123
|
-
groupBy: [FIELD_FUNCTION_NAME],
|
|
124
|
-
invertCallStack: true,
|
|
125
|
-
sandwichByFunction: sandwichFunctionName ?? undefined,
|
|
126
|
-
skip: sandwichFunctionName == null && !dashboardItems.includes('sandwich'),
|
|
127
|
-
protoFilters,
|
|
39
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
40
|
+
export var ProfileViewWithData = function ProfileViewWithData(_ref) {
|
|
41
|
+
var _flamegraphResponse$r, _flamegraphResponse$t, _flamegraphResponse$f, _profileMetadataRespo, _profileMetadataRespo2, _sourceResponse$repor, _calleesFlamegraphRes, _calleesFlamegraphRes2, _calleesFlamegraphRes3, _profileMetadataRespo3, _callersFlamegraphRes, _callersFlamegraphRes2, _callersFlamegraphRes3, _profileMetadataRespo4;
|
|
42
|
+
var queryClient = _ref.queryClient,
|
|
43
|
+
profileSource = _ref.profileSource,
|
|
44
|
+
showVisualizationSelector = _ref.showVisualizationSelector,
|
|
45
|
+
onSwitchToFifteenMinutes = _ref.onSwitchToFifteenMinutes;
|
|
46
|
+
var metadata = useGrpcMetadata();
|
|
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];
|
|
68
|
+
var _useState = useState(false),
|
|
69
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
70
|
+
pprofDownloading = _useState2[0],
|
|
71
|
+
setPprofDownloading = _useState2[1];
|
|
72
|
+
var _useProfileFilters = useProfileFilters(),
|
|
73
|
+
protoFilters = _useProfileFilters.protoFilters;
|
|
74
|
+
useEffect(function () {
|
|
75
|
+
// If profile type is not delta, remove flamechart from the dashboard items
|
|
76
|
+
// and set it to flame graph if no other items are selected.
|
|
77
|
+
if (profileSource == null) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
var profileType = profileSource.ProfileType();
|
|
81
|
+
var newDashboardItems = dashboardItems;
|
|
82
|
+
if (dashboardItems.includes('flamechart') && !profileType.delta) {
|
|
83
|
+
newDashboardItems = dashboardItems.filter(function (item) {
|
|
84
|
+
return item !== 'flamechart';
|
|
85
|
+
});
|
|
86
|
+
} else {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (newDashboardItems.length === 0) {
|
|
90
|
+
newDashboardItems = ['flamegraph'];
|
|
91
|
+
}
|
|
92
|
+
setDashboardItems(newDashboardItems);
|
|
93
|
+
}, [profileSource, dashboardItems, setDashboardItems]);
|
|
94
|
+
var nodeTrimThreshold = useMemo(function () {
|
|
95
|
+
var width =
|
|
96
|
+
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
|
97
|
+
window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
|
98
|
+
// subtract the padding
|
|
99
|
+
width = width - 12 - 16 - 12;
|
|
100
|
+
return 1 / width * 100;
|
|
101
|
+
}, []);
|
|
102
|
+
var _useQuery = useQuery(queryClient, profileSource, QueryRequest_ReportType.FLAMEGRAPH_ARROW, {
|
|
103
|
+
skip: !dashboardItems.includes('flamegraph'),
|
|
104
|
+
nodeTrimThreshold: nodeTrimThreshold,
|
|
105
|
+
groupBy: groupBy,
|
|
106
|
+
invertCallStack: invertCallStack !== null && invertCallStack !== void 0 ? invertCallStack : false,
|
|
107
|
+
protoFilters: protoFilters
|
|
108
|
+
}),
|
|
109
|
+
flamegraphLoading = _useQuery.isLoading,
|
|
110
|
+
flamegraphResponse = _useQuery.response,
|
|
111
|
+
flamegraphError = _useQuery.error;
|
|
112
|
+
var samplesEnabled = !!(dashboardItems.includes('flamechart') && validateFlameChartQuery(profileSource).isValid && (flamechartDimension !== null && flamechartDimension !== void 0 ? flamechartDimension : []).length > 0);
|
|
113
|
+
var _useMemo = useMemo(function () {
|
|
114
|
+
var bounds = boundsFromProfileSource(profileSource);
|
|
115
|
+
return [Number(bounds[0] / 1000000n), Number(bounds[1] / 1000000n)];
|
|
116
|
+
}, [profileSource]),
|
|
117
|
+
_useMemo2 = _slicedToArray(_useMemo, 2),
|
|
118
|
+
samplesFromMs = _useMemo2[0],
|
|
119
|
+
samplesToMs = _useMemo2[1];
|
|
120
|
+
var samplesSumBy = useMemo(function () {
|
|
121
|
+
return (flamechartDimension !== null && flamechartDimension !== void 0 ? flamechartDimension : []).map(function (f) {
|
|
122
|
+
return f.startsWith('labels.') ? f.slice('labels.'.length) : f;
|
|
128
123
|
});
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
124
|
+
}, [flamechartDimension]);
|
|
125
|
+
|
|
126
|
+
// Samples step count: 2px per data point for finer granularity in strips
|
|
127
|
+
var _useQueryState11 = useQueryState('samples_step_count', intParam.withDefault(getStepCountFromScreenWidth(2))),
|
|
128
|
+
_useQueryState12 = _slicedToArray(_useQueryState11, 1),
|
|
129
|
+
samplesStepCount = _useQueryState12[0];
|
|
130
|
+
var _useQueryRange = useQueryRange(queryClient, samplesEnabled ? profileSource.query.toString() : '', samplesFromMs, samplesToMs, samplesSumBy, samplesStepCount, !samplesEnabled),
|
|
131
|
+
samplesLoading = _useQueryRange.isLoading,
|
|
132
|
+
samplesRangeResponse = _useQueryRange.response,
|
|
133
|
+
samplesError = _useQueryRange.error,
|
|
134
|
+
samplesStepMs = _useQueryRange.stepDurationMs;
|
|
135
|
+
|
|
136
|
+
// Map QueryRange response to SamplesData
|
|
137
|
+
// TODO (manoj): Check if we can skip this mapping and adapt the CPUSampleStrips to work directly with the QueryRange response format.
|
|
138
|
+
var samplesData = useMemo(function () {
|
|
139
|
+
var _samplesRangeResponse;
|
|
140
|
+
if (samplesLoading) return {
|
|
141
|
+
loading: true,
|
|
142
|
+
error: null
|
|
143
|
+
};
|
|
144
|
+
if (samplesError != null) return {
|
|
145
|
+
loading: false,
|
|
146
|
+
error: samplesError
|
|
147
|
+
};
|
|
148
|
+
if ((samplesRangeResponse === null || samplesRangeResponse === void 0 || (_samplesRangeResponse = samplesRangeResponse.series) === null || _samplesRangeResponse === void 0 ? void 0 : _samplesRangeResponse.length) == null) return {
|
|
149
|
+
loading: false,
|
|
150
|
+
error: null
|
|
151
|
+
};
|
|
152
|
+
var series = samplesRangeResponse.series.map(function (ms) {
|
|
153
|
+
var _ms$labelset;
|
|
154
|
+
return {
|
|
155
|
+
labelset: (_ms$labelset = ms.labelset) !== null && _ms$labelset !== void 0 ? _ms$labelset : {
|
|
156
|
+
labels: []
|
|
157
|
+
},
|
|
158
|
+
data: ms.samples.map(function (s) {
|
|
159
|
+
return {
|
|
160
|
+
timestamp: Number(s.timestamp.seconds) * 1000 + Math.floor(s.timestamp.nanos / 1000000),
|
|
161
|
+
value: Number(s.value),
|
|
162
|
+
sampleCount: Number(s.count)
|
|
163
|
+
};
|
|
164
|
+
})
|
|
165
|
+
};
|
|
136
166
|
});
|
|
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
|
-
|
|
167
|
+
return {
|
|
168
|
+
loading: false,
|
|
169
|
+
series: series,
|
|
170
|
+
error: null,
|
|
171
|
+
stepMs: samplesStepMs
|
|
172
|
+
};
|
|
173
|
+
}, [samplesLoading, samplesRangeResponse, samplesError, samplesStepMs]);
|
|
174
|
+
var _useQuery2 = useQuery(queryClient, profileSource, QueryRequest_ReportType.PROFILE_METADATA, {
|
|
175
|
+
nodeTrimThreshold: nodeTrimThreshold,
|
|
176
|
+
groupBy: groupBy,
|
|
177
|
+
protoFilters: protoFilters,
|
|
178
|
+
staleTime: 0
|
|
179
|
+
}),
|
|
180
|
+
profileMetadataLoading = _useQuery2.isLoading,
|
|
181
|
+
profileMetadataResponse = _useQuery2.response,
|
|
182
|
+
profileMetadataError = _useQuery2.error,
|
|
183
|
+
metadataRefetch = _useQuery2.refetch;
|
|
184
|
+
var _useParcaContext = useParcaContext(),
|
|
185
|
+
perf = _useParcaContext.perf;
|
|
186
|
+
var _useQuery3 = useQuery(queryClient, profileSource, QueryRequest_ReportType.TABLE_ARROW, {
|
|
187
|
+
skip: !dashboardItems.includes('table') && !dashboardItems.includes('sandwich'),
|
|
188
|
+
protoFilters: protoFilters
|
|
189
|
+
}),
|
|
190
|
+
tableLoading = _useQuery3.isLoading,
|
|
191
|
+
tableResponse = _useQuery3.response,
|
|
192
|
+
tableError = _useQuery3.error;
|
|
193
|
+
var _useQuery4 = useQuery(queryClient, profileSource, QueryRequest_ReportType.SOURCE, {
|
|
194
|
+
skip: !dashboardItems.includes('source'),
|
|
195
|
+
sourceBuildID: sourceBuildID !== null && sourceBuildID !== void 0 ? sourceBuildID : undefined,
|
|
196
|
+
sourceFilename: sourceFilename !== null && sourceFilename !== void 0 ? sourceFilename : undefined,
|
|
197
|
+
protoFilters: protoFilters
|
|
198
|
+
}),
|
|
199
|
+
sourceLoading = _useQuery4.isLoading,
|
|
200
|
+
sourceResponse = _useQuery4.response,
|
|
201
|
+
sourceError = _useQuery4.error;
|
|
202
|
+
var _useQuery5 = useQuery(queryClient, profileSource, QueryRequest_ReportType.FLAMEGRAPH_ARROW, {
|
|
203
|
+
nodeTrimThreshold: nodeTrimThreshold,
|
|
204
|
+
groupBy: [FIELD_FUNCTION_NAME],
|
|
205
|
+
invertCallStack: true,
|
|
206
|
+
sandwichByFunction: sandwichFunctionName !== null && sandwichFunctionName !== void 0 ? sandwichFunctionName : undefined,
|
|
207
|
+
skip: sandwichFunctionName == null && !dashboardItems.includes('sandwich'),
|
|
208
|
+
protoFilters: protoFilters
|
|
209
|
+
}),
|
|
210
|
+
callersFlamegraphLoading = _useQuery5.isLoading,
|
|
211
|
+
callersFlamegraphResponse = _useQuery5.response,
|
|
212
|
+
callersFlamegraphError = _useQuery5.error;
|
|
213
|
+
var _useQuery6 = useQuery(queryClient, profileSource, QueryRequest_ReportType.FLAMEGRAPH_ARROW, {
|
|
214
|
+
nodeTrimThreshold: nodeTrimThreshold,
|
|
215
|
+
groupBy: [FIELD_FUNCTION_NAME],
|
|
216
|
+
invertCallStack: false,
|
|
217
|
+
sandwichByFunction: sandwichFunctionName !== null && sandwichFunctionName !== void 0 ? sandwichFunctionName : undefined,
|
|
218
|
+
skip: sandwichFunctionName == null && !dashboardItems.includes('sandwich'),
|
|
219
|
+
protoFilters: protoFilters
|
|
220
|
+
}),
|
|
221
|
+
calleesFlamegraphLoading = _useQuery6.isLoading,
|
|
222
|
+
calleesFlamegraphResponse = _useQuery6.response,
|
|
223
|
+
calleesFlamegraphError = _useQuery6.error;
|
|
224
|
+
useEffect(function () {
|
|
225
|
+
if (!flamegraphLoading && (flamegraphResponse === null || flamegraphResponse === void 0 ? void 0 : flamegraphResponse.report.oneofKind) === 'flamegraph' || (flamegraphResponse === null || flamegraphResponse === void 0 ? void 0 : flamegraphResponse.report.oneofKind) === 'flamegraphArrow') {
|
|
226
|
+
perf === null || perf === void 0 || perf.markInteraction('Flamegraph render', flamegraphResponse.total);
|
|
227
|
+
}
|
|
228
|
+
if (!tableLoading && (tableResponse === null || tableResponse === void 0 ? void 0 : tableResponse.report.oneofKind) === 'tableArrow') {
|
|
229
|
+
perf === null || perf === void 0 || perf.markInteraction('table render', tableResponse.total);
|
|
230
|
+
}
|
|
231
|
+
if (!sourceLoading && (sourceResponse === null || sourceResponse === void 0 ? void 0 : sourceResponse.report.oneofKind) === 'source') {
|
|
232
|
+
perf === null || perf === void 0 || perf.markInteraction('Source render', sourceResponse.total);
|
|
233
|
+
}
|
|
234
|
+
}, [flamegraphLoading, flamegraphResponse, tableLoading, tableResponse, sourceLoading, sourceResponse, perf]);
|
|
235
|
+
var downloadPProfClick = /*#__PURE__*/function () {
|
|
236
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
237
|
+
var req, blob, _t;
|
|
238
|
+
return _regenerator().w(function (_context) {
|
|
239
|
+
while (1) switch (_context.p = _context.n) {
|
|
240
|
+
case 0:
|
|
241
|
+
if (!(profileSource == null || queryClient == null)) {
|
|
242
|
+
_context.n = 1;
|
|
243
|
+
break;
|
|
244
|
+
}
|
|
245
|
+
return _context.a(2);
|
|
246
|
+
case 1:
|
|
247
|
+
_context.p = 1;
|
|
162
248
|
setPprofDownloading(true);
|
|
163
|
-
|
|
164
|
-
req.groupBy = {
|
|
165
|
-
|
|
166
|
-
|
|
249
|
+
req = profileSource.QueryRequest();
|
|
250
|
+
req.groupBy = {
|
|
251
|
+
fields: groupBy
|
|
252
|
+
};
|
|
253
|
+
_context.n = 2;
|
|
254
|
+
return downloadPprof(req, queryClient, metadata);
|
|
255
|
+
case 2:
|
|
256
|
+
blob = _context.v;
|
|
257
|
+
saveAsBlob(blob, "profile.pb.gz");
|
|
167
258
|
setPprofDownloading(false);
|
|
168
|
-
|
|
169
|
-
|
|
259
|
+
_context.n = 4;
|
|
260
|
+
break;
|
|
261
|
+
case 3:
|
|
262
|
+
_context.p = 3;
|
|
263
|
+
_t = _context.v;
|
|
170
264
|
setPprofDownloading(false);
|
|
171
|
-
console.error('Error while querying',
|
|
265
|
+
console.error('Error while querying', _t);
|
|
266
|
+
case 4:
|
|
267
|
+
return _context.a(2);
|
|
172
268
|
}
|
|
269
|
+
}, _callee, null, [[1, 3]]);
|
|
270
|
+
}));
|
|
271
|
+
return function downloadPProfClick() {
|
|
272
|
+
return _ref2.apply(this, arguments);
|
|
173
273
|
};
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
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
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
metadataMappingFiles: profileMetadataResponse?.report.oneofKind === 'profileMetadata'
|
|
252
|
-
? profileMetadataResponse?.report?.profileMetadata?.mappingFiles
|
|
253
|
-
: undefined,
|
|
254
|
-
metadataLoading: profileMetadataLoading,
|
|
255
|
-
},
|
|
256
|
-
}, samplesData: samplesData, profileSource: profileSource, queryClient: queryClient, onDownloadPProf: () => void downloadPProfClick(), pprofDownloading: pprofDownloading, showVisualizationSelector: showVisualizationSelector, onSwitchToFifteenMinutes: onSwitchToFifteenMinutes }));
|
|
274
|
+
}();
|
|
275
|
+
|
|
276
|
+
// TODO: Refactor how we get responses such that we have a single response,
|
|
277
|
+
// regardless of the report type.
|
|
278
|
+
var total = BigInt(0);
|
|
279
|
+
var filtered = BigInt(0);
|
|
280
|
+
if (flamegraphResponse !== null) {
|
|
281
|
+
total = BigInt(flamegraphResponse.total);
|
|
282
|
+
filtered = BigInt(flamegraphResponse.filtered);
|
|
283
|
+
} else if (tableResponse !== null) {
|
|
284
|
+
total = BigInt(tableResponse.total);
|
|
285
|
+
filtered = BigInt(tableResponse.filtered);
|
|
286
|
+
} else if (sourceResponse !== null) {
|
|
287
|
+
total = BigInt(sourceResponse.total);
|
|
288
|
+
filtered = BigInt(sourceResponse.filtered);
|
|
289
|
+
} else if (callersFlamegraphResponse !== null) {
|
|
290
|
+
total = BigInt(callersFlamegraphResponse.total);
|
|
291
|
+
filtered = BigInt(callersFlamegraphResponse.filtered);
|
|
292
|
+
} else if (calleesFlamegraphResponse !== null) {
|
|
293
|
+
total = BigInt(calleesFlamegraphResponse.total);
|
|
294
|
+
filtered = BigInt(calleesFlamegraphResponse.filtered);
|
|
295
|
+
}
|
|
296
|
+
return /*#__PURE__*/_jsx(ProfileView, {
|
|
297
|
+
total: total,
|
|
298
|
+
filtered: filtered,
|
|
299
|
+
flamegraphData: {
|
|
300
|
+
loading: flamegraphLoading && profileMetadataLoading,
|
|
301
|
+
arrow: (flamegraphResponse === null || flamegraphResponse === void 0 ? void 0 : flamegraphResponse.report.oneofKind) === 'flamegraphArrow' ? flamegraphResponse === null || flamegraphResponse === void 0 || (_flamegraphResponse$r = flamegraphResponse.report) === null || _flamegraphResponse$r === void 0 ? void 0 : _flamegraphResponse$r.flamegraphArrow : undefined,
|
|
302
|
+
total: BigInt((_flamegraphResponse$t = flamegraphResponse === null || flamegraphResponse === void 0 ? void 0 : flamegraphResponse.total) !== null && _flamegraphResponse$t !== void 0 ? _flamegraphResponse$t : '0'),
|
|
303
|
+
filtered: BigInt((_flamegraphResponse$f = flamegraphResponse === null || flamegraphResponse === void 0 ? void 0 : flamegraphResponse.filtered) !== null && _flamegraphResponse$f !== void 0 ? _flamegraphResponse$f : '0'),
|
|
304
|
+
error: flamegraphError !== null && flamegraphError !== void 0 ? flamegraphError : profileMetadataError,
|
|
305
|
+
metadataMappingFiles: (profileMetadataResponse === null || profileMetadataResponse === void 0 ? void 0 : profileMetadataResponse.report.oneofKind) === 'profileMetadata' ? profileMetadataResponse === null || profileMetadataResponse === void 0 || (_profileMetadataRespo = profileMetadataResponse.report) === null || _profileMetadataRespo === void 0 || (_profileMetadataRespo = _profileMetadataRespo.profileMetadata) === null || _profileMetadataRespo === void 0 ? void 0 : _profileMetadataRespo.mappingFiles : undefined,
|
|
306
|
+
metadataLabels: (profileMetadataResponse === null || profileMetadataResponse === void 0 ? void 0 : profileMetadataResponse.report.oneofKind) === 'profileMetadata' ? profileMetadataResponse === null || profileMetadataResponse === void 0 || (_profileMetadataRespo2 = profileMetadataResponse.report) === null || _profileMetadataRespo2 === void 0 || (_profileMetadataRespo2 = _profileMetadataRespo2.profileMetadata) === null || _profileMetadataRespo2 === void 0 ? void 0 : _profileMetadataRespo2.labels : undefined,
|
|
307
|
+
metadataLoading: profileMetadataLoading,
|
|
308
|
+
metadataRefetch: metadataRefetch
|
|
309
|
+
},
|
|
310
|
+
topTableData: {
|
|
311
|
+
loading: tableLoading,
|
|
312
|
+
arrow: (tableResponse === null || tableResponse === void 0 ? void 0 : tableResponse.report.oneofKind) === 'tableArrow' ? tableResponse.report.tableArrow : undefined,
|
|
313
|
+
error: tableError,
|
|
314
|
+
unit: (tableResponse === null || tableResponse === void 0 ? void 0 : tableResponse.report.oneofKind) === 'tableArrow' ? tableResponse.report.tableArrow.unit : ''
|
|
315
|
+
},
|
|
316
|
+
sourceData: {
|
|
317
|
+
loading: sourceLoading,
|
|
318
|
+
data: (sourceResponse === null || sourceResponse === void 0 ? void 0 : sourceResponse.report.oneofKind) === 'source' ? sourceResponse === null || sourceResponse === void 0 || (_sourceResponse$repor = sourceResponse.report) === null || _sourceResponse$repor === void 0 ? void 0 : _sourceResponse$repor.source : undefined,
|
|
319
|
+
error: sourceError
|
|
320
|
+
},
|
|
321
|
+
sandwichData: {
|
|
322
|
+
callees: {
|
|
323
|
+
arrow: (calleesFlamegraphResponse === null || calleesFlamegraphResponse === void 0 ? void 0 : calleesFlamegraphResponse.report.oneofKind) === 'flamegraphArrow' ? calleesFlamegraphResponse === null || calleesFlamegraphResponse === void 0 || (_calleesFlamegraphRes = calleesFlamegraphResponse.report) === null || _calleesFlamegraphRes === void 0 ? void 0 : _calleesFlamegraphRes.flamegraphArrow : undefined,
|
|
324
|
+
loading: calleesFlamegraphLoading,
|
|
325
|
+
error: calleesFlamegraphError,
|
|
326
|
+
total: BigInt((_calleesFlamegraphRes2 = calleesFlamegraphResponse === null || calleesFlamegraphResponse === void 0 ? void 0 : calleesFlamegraphResponse.total) !== null && _calleesFlamegraphRes2 !== void 0 ? _calleesFlamegraphRes2 : '0'),
|
|
327
|
+
filtered: BigInt((_calleesFlamegraphRes3 = calleesFlamegraphResponse === null || calleesFlamegraphResponse === void 0 ? void 0 : calleesFlamegraphResponse.filtered) !== null && _calleesFlamegraphRes3 !== void 0 ? _calleesFlamegraphRes3 : '0'),
|
|
328
|
+
metadataMappingFiles: (profileMetadataResponse === null || profileMetadataResponse === void 0 ? void 0 : profileMetadataResponse.report.oneofKind) === 'profileMetadata' ? profileMetadataResponse === null || profileMetadataResponse === void 0 || (_profileMetadataRespo3 = profileMetadataResponse.report) === null || _profileMetadataRespo3 === void 0 || (_profileMetadataRespo3 = _profileMetadataRespo3.profileMetadata) === null || _profileMetadataRespo3 === void 0 ? void 0 : _profileMetadataRespo3.mappingFiles : undefined,
|
|
329
|
+
metadataLoading: profileMetadataLoading
|
|
330
|
+
},
|
|
331
|
+
callers: {
|
|
332
|
+
arrow: (callersFlamegraphResponse === null || callersFlamegraphResponse === void 0 ? void 0 : callersFlamegraphResponse.report.oneofKind) === 'flamegraphArrow' ? callersFlamegraphResponse === null || callersFlamegraphResponse === void 0 || (_callersFlamegraphRes = callersFlamegraphResponse.report) === null || _callersFlamegraphRes === void 0 ? void 0 : _callersFlamegraphRes.flamegraphArrow : undefined,
|
|
333
|
+
loading: callersFlamegraphLoading,
|
|
334
|
+
error: callersFlamegraphError,
|
|
335
|
+
total: BigInt((_callersFlamegraphRes2 = callersFlamegraphResponse === null || callersFlamegraphResponse === void 0 ? void 0 : callersFlamegraphResponse.total) !== null && _callersFlamegraphRes2 !== void 0 ? _callersFlamegraphRes2 : '0'),
|
|
336
|
+
filtered: BigInt((_callersFlamegraphRes3 = callersFlamegraphResponse === null || callersFlamegraphResponse === void 0 ? void 0 : callersFlamegraphResponse.filtered) !== null && _callersFlamegraphRes3 !== void 0 ? _callersFlamegraphRes3 : '0'),
|
|
337
|
+
metadataMappingFiles: (profileMetadataResponse === null || profileMetadataResponse === void 0 ? void 0 : profileMetadataResponse.report.oneofKind) === 'profileMetadata' ? profileMetadataResponse === null || profileMetadataResponse === void 0 || (_profileMetadataRespo4 = profileMetadataResponse.report) === null || _profileMetadataRespo4 === void 0 || (_profileMetadataRespo4 = _profileMetadataRespo4.profileMetadata) === null || _profileMetadataRespo4 === void 0 ? void 0 : _profileMetadataRespo4.mappingFiles : undefined,
|
|
338
|
+
metadataLoading: profileMetadataLoading
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
samplesData: samplesData,
|
|
342
|
+
profileSource: profileSource,
|
|
343
|
+
queryClient: queryClient,
|
|
344
|
+
onDownloadPProf: function onDownloadPProf() {
|
|
345
|
+
return void downloadPProfClick();
|
|
346
|
+
},
|
|
347
|
+
pprofDownloading: pprofDownloading,
|
|
348
|
+
showVisualizationSelector: showVisualizationSelector,
|
|
349
|
+
onSwitchToFifteenMinutes: onSwitchToFifteenMinutes
|
|
350
|
+
});
|
|
257
351
|
};
|
|
258
|
-
export default ProfileViewWithData;
|
|
352
|
+
export default ProfileViewWithData;
|