@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,5 +1,4 @@
|
|
|
1
1
|
import { ProfileTypesResponse } from '@parca/client';
|
|
2
|
-
import { type NavigateFunction } from '@parca/utilities';
|
|
3
2
|
import { QuerySelection } from '../ProfileSelector';
|
|
4
3
|
interface Props {
|
|
5
4
|
selectedProfileName: string;
|
|
@@ -7,10 +6,9 @@ interface Props {
|
|
|
7
6
|
setProfileName: (name: string) => void;
|
|
8
7
|
setQueryExpression: () => void;
|
|
9
8
|
querySelection: QuerySelection;
|
|
10
|
-
navigateTo: NavigateFunction;
|
|
11
9
|
loading: boolean;
|
|
12
10
|
defaultProfileType?: string;
|
|
13
11
|
}
|
|
14
|
-
export declare const useAutoQuerySelector: ({ selectedProfileName, profileTypesData, setProfileName, setQueryExpression, querySelection,
|
|
12
|
+
export declare const useAutoQuerySelector: ({ selectedProfileName, profileTypesData, setProfileName, setQueryExpression, querySelection, loading, defaultProfileType, }: Props) => void;
|
|
15
13
|
export {};
|
|
16
14
|
//# sourceMappingURL=useAutoQuerySelector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAutoQuerySelector.d.ts","sourceRoot":"","sources":["../../src/ProfileSelector/useAutoQuerySelector.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAutoQuerySelector.d.ts","sourceRoot":"","sources":["../../src/ProfileSelector/useAutoQuerySelector.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAC,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAInD,OAAO,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAKlD,UAAU,KAAK;IACb,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,oBAAoB,GAAG,SAAS,CAAC;IACnD,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,cAAc,EAAE,cAAc,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,oBAAoB,GAAI,6HAQlC,KAAK,KAAG,IAyLV,CAAC"}
|
|
@@ -1,3 +1,14 @@
|
|
|
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; }
|
|
11
|
+
import { c as _c } from "react-compiler-runtime";
|
|
1
12
|
// Copyright 2022 The Parca Authors
|
|
2
13
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
14
|
// you may not use this file except in compliance with the License.
|
|
@@ -10,141 +21,278 @@
|
|
|
10
21
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
22
|
// See the License for the specific language governing permissions and
|
|
12
23
|
// limitations under the License.
|
|
24
|
+
|
|
13
25
|
import { useEffect, useRef } from 'react';
|
|
26
|
+
import { useQueryStates } from 'nuqs';
|
|
14
27
|
import { selectAutoQuery, setAutoQuery, useAppDispatch, useAppSelector } from '@parca/store';
|
|
15
|
-
import { ProfileSelectionFromParams
|
|
28
|
+
import { ProfileSelectionFromParams } from '..';
|
|
16
29
|
import { constructProfileName } from '../ProfileTypeSelector';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
import { boolParam, stringParam } from '../hooks/urlParsers';
|
|
31
|
+
import { useDashboardItems } from '../hooks/useDashboardItems';
|
|
32
|
+
export var useAutoQuerySelector = function useAutoQuerySelector(t0) {
|
|
33
|
+
var $ = _c(49);
|
|
34
|
+
var selectedProfileName = t0.selectedProfileName,
|
|
35
|
+
profileTypesData = t0.profileTypesData,
|
|
36
|
+
setProfileName = t0.setProfileName,
|
|
37
|
+
setQueryExpression = t0.setQueryExpression,
|
|
38
|
+
querySelection = t0.querySelection,
|
|
39
|
+
loading = t0.loading,
|
|
40
|
+
defaultProfileType = t0.defaultProfileType;
|
|
41
|
+
var autoQuery = useAppSelector(selectAutoQuery);
|
|
42
|
+
var dispatch = useAppDispatch();
|
|
43
|
+
var _useDashboardItems = useDashboardItems(),
|
|
44
|
+
setDashboardItems = _useDashboardItems.setDashboardItems;
|
|
45
|
+
var t1;
|
|
46
|
+
var t2;
|
|
47
|
+
if ($[0] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
48
|
+
t1 = {
|
|
49
|
+
compare_a: boolParam,
|
|
50
|
+
compare_b: boolParam,
|
|
51
|
+
expression_a: stringParam,
|
|
52
|
+
from_a: stringParam,
|
|
53
|
+
to_a: stringParam,
|
|
54
|
+
time_selection_a: stringParam,
|
|
55
|
+
sum_by_a: stringParam,
|
|
56
|
+
merge_from_a: stringParam,
|
|
57
|
+
merge_to_a: stringParam,
|
|
58
|
+
selection_a: stringParam,
|
|
59
|
+
expression_b: stringParam,
|
|
60
|
+
from_b: stringParam,
|
|
61
|
+
to_b: stringParam,
|
|
62
|
+
time_selection_b: stringParam,
|
|
63
|
+
sum_by_b: stringParam,
|
|
64
|
+
search_string: stringParam
|
|
65
|
+
};
|
|
66
|
+
t2 = {
|
|
67
|
+
history: "replace"
|
|
68
|
+
};
|
|
69
|
+
$[0] = t1;
|
|
70
|
+
$[1] = t2;
|
|
71
|
+
} else {
|
|
72
|
+
t1 = $[0];
|
|
73
|
+
t2 = $[1];
|
|
74
|
+
}
|
|
75
|
+
var _useQueryStates = useQueryStates(t1, t2),
|
|
76
|
+
_useQueryStates2 = _slicedToArray(_useQueryStates, 2),
|
|
77
|
+
compareState = _useQueryStates2[0],
|
|
78
|
+
setCompareParams = _useQueryStates2[1];
|
|
79
|
+
var comparing = compareState.compare_a === true || compareState.compare_b === true;
|
|
80
|
+
var expressionA = compareState.expression_a;
|
|
81
|
+
var expressionB = compareState.expression_b;
|
|
82
|
+
var hasSetupCompareMode = useRef(false);
|
|
83
|
+
var t3;
|
|
84
|
+
if ($[2] !== comparing || $[3] !== expressionA || $[4] !== expressionB || $[5] !== loading || $[6] !== querySelection || $[7] !== setCompareParams || $[8] !== setDashboardItems) {
|
|
85
|
+
t3 = function t3() {
|
|
86
|
+
if (loading) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (comparing && expressionA !== null && expressionB === null && !hasSetupCompareMode.current) {
|
|
90
|
+
var _querySelection$merge, _querySelection$merge2, _queryA$sumBy$join, _queryA$sumBy, _profileA$HistoryPara, _profileA$HistoryPara2, _profileA$HistoryPara3;
|
|
91
|
+
if (querySelection.expression === undefined) {
|
|
92
|
+
return;
|
|
31
93
|
}
|
|
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
|
-
|
|
114
|
-
|
|
115
|
-
|
|
94
|
+
var profileA = ProfileSelectionFromParams((_querySelection$merge = querySelection.mergeFrom) === null || _querySelection$merge === void 0 ? void 0 : _querySelection$merge.toString(), (_querySelection$merge2 = querySelection.mergeTo) === null || _querySelection$merge2 === void 0 ? void 0 : _querySelection$merge2.toString(), querySelection.expression);
|
|
95
|
+
var queryA = {
|
|
96
|
+
expression: querySelection.expression,
|
|
97
|
+
from: querySelection.from,
|
|
98
|
+
to: querySelection.to,
|
|
99
|
+
timeSelection: querySelection.timeSelection,
|
|
100
|
+
sumBy: querySelection.sumBy
|
|
101
|
+
};
|
|
102
|
+
var sumBy = (_queryA$sumBy$join = (_queryA$sumBy = queryA.sumBy) === null || _queryA$sumBy === void 0 ? void 0 : _queryA$sumBy.join(",")) !== null && _queryA$sumBy$join !== void 0 ? _queryA$sumBy$join : null;
|
|
103
|
+
var mergeFromA = profileA != null ? (_profileA$HistoryPara = profileA.HistoryParams().merge_from) === null || _profileA$HistoryPara === void 0 ? void 0 : _profileA$HistoryPara.toString() : null;
|
|
104
|
+
var mergeToA = profileA != null ? (_profileA$HistoryPara2 = profileA.HistoryParams().merge_to) === null || _profileA$HistoryPara2 === void 0 ? void 0 : _profileA$HistoryPara2.toString() : null;
|
|
105
|
+
var selectionA = profileA != null ? (_profileA$HistoryPara3 = profileA.HistoryParams().selection) === null || _profileA$HistoryPara3 === void 0 ? void 0 : _profileA$HistoryPara3.toString() : null;
|
|
106
|
+
hasSetupCompareMode.current = true;
|
|
107
|
+
setCompareParams({
|
|
108
|
+
compare_a: true,
|
|
109
|
+
compare_b: true,
|
|
110
|
+
expression_a: queryA.expression,
|
|
111
|
+
from_a: queryA.from.toString(),
|
|
112
|
+
to_a: queryA.to.toString(),
|
|
113
|
+
time_selection_a: queryA.timeSelection,
|
|
114
|
+
sum_by_a: sumBy,
|
|
115
|
+
merge_from_a: mergeFromA,
|
|
116
|
+
merge_to_a: mergeToA,
|
|
117
|
+
selection_a: selectionA,
|
|
118
|
+
expression_b: queryA.expression,
|
|
119
|
+
from_b: queryA.from.toString(),
|
|
120
|
+
to_b: queryA.to.toString(),
|
|
121
|
+
time_selection_b: queryA.timeSelection,
|
|
122
|
+
sum_by_b: sumBy,
|
|
123
|
+
search_string: null
|
|
124
|
+
});
|
|
125
|
+
setDashboardItems(["flamegraph"]);
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
$[2] = comparing;
|
|
129
|
+
$[3] = expressionA;
|
|
130
|
+
$[4] = expressionB;
|
|
131
|
+
$[5] = loading;
|
|
132
|
+
$[6] = querySelection;
|
|
133
|
+
$[7] = setCompareParams;
|
|
134
|
+
$[8] = setDashboardItems;
|
|
135
|
+
$[9] = t3;
|
|
136
|
+
} else {
|
|
137
|
+
t3 = $[9];
|
|
138
|
+
}
|
|
139
|
+
var t4;
|
|
140
|
+
if ($[10] !== comparing || $[11] !== dispatch || $[12] !== expressionA || $[13] !== expressionB || $[14] !== loading || $[15] !== querySelection || $[16] !== setCompareParams || $[17] !== setDashboardItems) {
|
|
141
|
+
t4 = [comparing, querySelection, expressionA, expressionB, dispatch, loading, setCompareParams, setDashboardItems];
|
|
142
|
+
$[10] = comparing;
|
|
143
|
+
$[11] = dispatch;
|
|
144
|
+
$[12] = expressionA;
|
|
145
|
+
$[13] = expressionB;
|
|
146
|
+
$[14] = loading;
|
|
147
|
+
$[15] = querySelection;
|
|
148
|
+
$[16] = setCompareParams;
|
|
149
|
+
$[17] = setDashboardItems;
|
|
150
|
+
$[18] = t4;
|
|
151
|
+
} else {
|
|
152
|
+
t4 = $[18];
|
|
153
|
+
}
|
|
154
|
+
useEffect(t3, t4);
|
|
155
|
+
var t5;
|
|
156
|
+
if ($[19] !== autoQuery || $[20] !== defaultProfileType || $[21] !== dispatch || $[22] !== profileTypesData || $[23] !== selectedProfileName.length || $[24] !== setProfileName) {
|
|
157
|
+
t5 = function t5() {
|
|
158
|
+
_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
159
|
+
var profileType;
|
|
160
|
+
return _regenerator().w(function (_context) {
|
|
161
|
+
while (1) switch (_context.n) {
|
|
162
|
+
case 0:
|
|
163
|
+
if (!(selectedProfileName.length > 0)) {
|
|
164
|
+
_context.n = 1;
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
return _context.a(2);
|
|
168
|
+
case 1:
|
|
169
|
+
if (!((profileTypesData === null || profileTypesData === void 0 ? void 0 : profileTypesData.types) == null || profileTypesData.types.length < 1)) {
|
|
170
|
+
_context.n = 2;
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
return _context.a(2);
|
|
174
|
+
case 2:
|
|
175
|
+
if (!(autoQuery === "true")) {
|
|
176
|
+
_context.n = 3;
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
return _context.a(2);
|
|
180
|
+
case 3:
|
|
181
|
+
dispatch(setAutoQuery("true"));
|
|
182
|
+
if (!(defaultProfileType != null && defaultProfileType.length > 0)) {
|
|
183
|
+
_context.n = 4;
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
setProfileName(defaultProfileType);
|
|
187
|
+
return _context.a(2);
|
|
188
|
+
case 4:
|
|
189
|
+
profileType = profileTypesData.types.find(_temp);
|
|
190
|
+
if (profileType == null) {
|
|
191
|
+
profileType = profileTypesData.types.find(_temp2);
|
|
192
|
+
}
|
|
193
|
+
if (profileType == null) {
|
|
194
|
+
profileType = profileTypesData.types.find(_temp3);
|
|
195
|
+
}
|
|
196
|
+
if (profileType == null) {
|
|
197
|
+
profileType = profileTypesData.types.find(_temp4);
|
|
198
|
+
}
|
|
199
|
+
if (profileType == null) {
|
|
200
|
+
profileType = profileTypesData.types.find(_temp5);
|
|
201
|
+
}
|
|
202
|
+
if (profileType == null) {
|
|
116
203
|
profileType = profileTypesData.types[0];
|
|
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
|
-
|
|
204
|
+
}
|
|
205
|
+
setProfileName(constructProfileName(profileType));
|
|
206
|
+
case 5:
|
|
207
|
+
return _context.a(2);
|
|
208
|
+
}
|
|
209
|
+
}, _callee);
|
|
210
|
+
}))();
|
|
211
|
+
};
|
|
212
|
+
$[19] = autoQuery;
|
|
213
|
+
$[20] = defaultProfileType;
|
|
214
|
+
$[21] = dispatch;
|
|
215
|
+
$[22] = profileTypesData;
|
|
216
|
+
$[23] = selectedProfileName.length;
|
|
217
|
+
$[24] = setProfileName;
|
|
218
|
+
$[25] = t5;
|
|
219
|
+
} else {
|
|
220
|
+
t5 = $[25];
|
|
221
|
+
}
|
|
222
|
+
var t6;
|
|
223
|
+
if ($[26] !== autoQuery || $[27] !== defaultProfileType || $[28] !== dispatch || $[29] !== profileTypesData || $[30] !== selectedProfileName || $[31] !== setProfileName || $[32] !== setQueryExpression) {
|
|
224
|
+
t6 = [profileTypesData, selectedProfileName, autoQuery, dispatch, setQueryExpression, setProfileName, defaultProfileType];
|
|
225
|
+
$[26] = autoQuery;
|
|
226
|
+
$[27] = defaultProfileType;
|
|
227
|
+
$[28] = dispatch;
|
|
228
|
+
$[29] = profileTypesData;
|
|
229
|
+
$[30] = selectedProfileName;
|
|
230
|
+
$[31] = setProfileName;
|
|
231
|
+
$[32] = setQueryExpression;
|
|
232
|
+
$[33] = t6;
|
|
233
|
+
} else {
|
|
234
|
+
t6 = $[33];
|
|
235
|
+
}
|
|
236
|
+
useEffect(t5, t6);
|
|
237
|
+
var t7;
|
|
238
|
+
if ($[34] !== autoQuery || $[35] !== dispatch || $[36] !== loading || $[37] !== profileTypesData || $[38] !== selectedProfileName.length || $[39] !== setQueryExpression) {
|
|
239
|
+
t7 = function t7() {
|
|
240
|
+
_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
241
|
+
return _regenerator().w(function (_context2) {
|
|
242
|
+
while (1) switch (_context2.n) {
|
|
243
|
+
case 0:
|
|
244
|
+
if (!(autoQuery !== "true" || (profileTypesData === null || profileTypesData === void 0 ? void 0 : profileTypesData.types) == null || profileTypesData.types.length < 1 || selectedProfileName.length === 0 || loading)) {
|
|
245
|
+
_context2.n = 1;
|
|
246
|
+
break;
|
|
247
|
+
}
|
|
248
|
+
return _context2.a(2);
|
|
249
|
+
case 1:
|
|
250
|
+
setQueryExpression();
|
|
251
|
+
dispatch(setAutoQuery("false"));
|
|
252
|
+
case 2:
|
|
253
|
+
return _context2.a(2);
|
|
254
|
+
}
|
|
255
|
+
}, _callee2);
|
|
256
|
+
}))();
|
|
257
|
+
};
|
|
258
|
+
$[34] = autoQuery;
|
|
259
|
+
$[35] = dispatch;
|
|
260
|
+
$[36] = loading;
|
|
261
|
+
$[37] = profileTypesData;
|
|
262
|
+
$[38] = selectedProfileName.length;
|
|
263
|
+
$[39] = setQueryExpression;
|
|
264
|
+
$[40] = t7;
|
|
265
|
+
} else {
|
|
266
|
+
t7 = $[40];
|
|
267
|
+
}
|
|
268
|
+
var t8;
|
|
269
|
+
if ($[41] !== autoQuery || $[42] !== dispatch || $[43] !== loading || $[44] !== profileTypesData || $[45] !== selectedProfileName || $[46] !== setProfileName || $[47] !== setQueryExpression) {
|
|
270
|
+
t8 = [profileTypesData, setQueryExpression, autoQuery, setProfileName, dispatch, selectedProfileName, loading];
|
|
271
|
+
$[41] = autoQuery;
|
|
272
|
+
$[42] = dispatch;
|
|
273
|
+
$[43] = loading;
|
|
274
|
+
$[44] = profileTypesData;
|
|
275
|
+
$[45] = selectedProfileName;
|
|
276
|
+
$[46] = setProfileName;
|
|
277
|
+
$[47] = setQueryExpression;
|
|
278
|
+
$[48] = t8;
|
|
279
|
+
} else {
|
|
280
|
+
t8 = $[48];
|
|
281
|
+
}
|
|
282
|
+
useEffect(t7, t8);
|
|
150
283
|
};
|
|
284
|
+
function _temp(type) {
|
|
285
|
+
return type.name === "parca_agent" && type.sampleType === "samples" && type.delta;
|
|
286
|
+
}
|
|
287
|
+
function _temp2(type_0) {
|
|
288
|
+
return type_0.name === "go_opentelemetry_io_ebpf_profiler" && type_0.delta;
|
|
289
|
+
}
|
|
290
|
+
function _temp3(type_1) {
|
|
291
|
+
return type_1.name === "otel_profiling_agent_on_cpu" && type_1.delta;
|
|
292
|
+
}
|
|
293
|
+
function _temp4(type_2) {
|
|
294
|
+
return type_2.name === "parca_agent_cpu" && type_2.delta;
|
|
295
|
+
}
|
|
296
|
+
function _temp5(type_3) {
|
|
297
|
+
return type_3.name === "process_cpu" && type_3.delta;
|
|
298
|
+
}
|