@parca/profile 0.19.140 → 0.19.142
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 +5 -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.d.ts.map +1 -1
- package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.js +104 -72
- 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 +241 -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.d.ts +2 -2
- package/dist/ProfileFlameChart/SamplesStrips/index.d.ts.map +1 -1
- package/dist/ProfileFlameChart/SamplesStrips/index.js +645 -134
- package/dist/ProfileFlameChart/SamplesStrips/labelSetUtils.js +114 -55
- package/dist/ProfileFlameChart/index.d.ts.map +1 -1
- package/dist/ProfileFlameChart/index.js +267 -129
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.js +288 -89
- 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 +72 -47
- 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.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/index.js +324 -150
- package/dist/ProfileMetricsGraph/hooks/useQueryRange.js +140 -32
- package/dist/ProfileMetricsGraph/index.d.ts.map +1 -1
- package/dist/ProfileMetricsGraph/index.js +519 -258
- package/dist/ProfileSelector/CompareButton.js +132 -12
- package/dist/ProfileSelector/MetricsGraphSection.d.ts.map +1 -1
- package/dist/ProfileSelector/MetricsGraphSection.js +236 -64
- package/dist/ProfileSelector/index.d.ts.map +1 -1
- package/dist/ProfileSelector/index.js +727 -141
- package/dist/ProfileSelector/useAutoQuerySelector.js +249 -130
- 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.d.ts.map +1 -1
- package/dist/ProfileView/components/ActionButtons/SortByDropdown.js +141 -35
- package/dist/ProfileView/components/ColorStackLegend.d.ts.map +1 -1
- package/dist/ProfileView/components/ColorStackLegend.js +185 -55
- 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.d.ts.map +1 -1
- package/dist/ProfileView/components/InvertCallStack/index.js +100 -12
- 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.d.ts +2 -1
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.d.ts.map +1 -1
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.js +188 -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 +678 -194
- package/dist/ProfileView/components/Toolbars/SwitchMenuItem.js +94 -7
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.js +199 -157
- package/dist/ProfileView/components/Toolbars/index.d.ts +2 -2
- package/dist/ProfileView/components/Toolbars/index.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/index.js +441 -21
- package/dist/ProfileView/components/ViewSelector/Dropdown.js +233 -22
- package/dist/ProfileView/components/ViewSelector/index.d.ts.map +1 -1
- package/dist/ProfileView/components/ViewSelector/index.js +212 -86
- 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.d.ts.map +1 -1
- package/dist/ProfileView/context/DashboardContext.js +85 -29
- 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.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetFlameGraphState.js +32 -12
- package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.js +71 -27
- package/dist/ProfileView/hooks/useResetStateOnSeriesChange.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetStateOnSeriesChange.js +40 -19
- package/dist/ProfileView/hooks/useVisualizationState.d.ts +3 -3
- package/dist/ProfileView/hooks/useVisualizationState.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useVisualizationState.js +258 -67
- 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.d.ts.map +1 -1
- package/dist/ProfileViewWithData.js +332 -228
- 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.d.ts.map +1 -1
- package/dist/Sandwich/index.js +126 -14
- 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.d.ts.map +1 -1
- package/dist/SourceView/index.js +178 -104
- package/dist/SourceView/lang-detector/ext-to-lang.json +798 -798
- package/dist/SourceView/lang-detector/index.js +28 -14
- package/dist/SourceView/useSelectedLineRange.d.ts.map +1 -1
- package/dist/SourceView/useSelectedLineRange.js +99 -23
- package/dist/Table/ColorCell.js +42 -1
- package/dist/Table/ColumnsVisibility.js +114 -6
- package/dist/Table/MoreDropdown.d.ts.map +1 -1
- package/dist/Table/MoreDropdown.js +122 -25
- package/dist/Table/TableContextMenu.d.ts.map +1 -1
- package/dist/Table/TableContextMenu.js +151 -137
- 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 +333 -169
- package/dist/Table/index.d.ts.map +1 -1
- package/dist/Table/index.js +222 -128
- 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.d.ts.map +1 -1
- package/dist/TopTable/index.js +342 -123
- package/dist/contexts/LabelsQueryProvider.js +94 -32
- package/dist/contexts/UnifiedLabelsContext.js +114 -49
- package/dist/contexts/utils.js +37 -15
- package/dist/hooks/useCompareModeMeta.d.ts.map +1 -1
- package/dist/hooks/useCompareModeMeta.js +158 -64
- package/dist/hooks/useLabels.js +295 -52
- package/dist/hooks/useQueryState.d.ts +3 -3
- package/dist/hooks/useQueryState.d.ts.map +1 -1
- package/dist/hooks/useQueryState.js +373 -332
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -8
- 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 +1 -1
- package/dist/useSumBy.d.ts.map +1 -1
- package/dist/useSumBy.js +294 -138
- package/dist/utils.js +62 -30
- package/package.json +9 -10
- package/src/GraphTooltipArrow/index.tsx +3 -0
- package/src/GraphTooltipArrow/useGraphTooltipMetaInfo/index.ts +13 -11
- 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 -4
- package/src/ProfileFlameChart/SamplesStrips/index.tsx +2 -2
- package/src/ProfileFlameChart/index.tsx +28 -21
- package/src/ProfileFlameGraph/FlameGraphArrow/ContextMenu.tsx +9 -10
- package/src/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.tsx +6 -5
- 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/ProfileFlameGraph/index.tsx +9 -6
- package/src/ProfileMetricsGraph/index.tsx +8 -6
- package/src/ProfileSelector/MetricsGraphSection.tsx +10 -5
- package/src/ProfileSelector/index.tsx +61 -39
- package/src/ProfileView/components/ActionButtons/SortByDropdown.tsx +6 -10
- package/src/ProfileView/components/ColorStackLegend.tsx +4 -2
- package/src/ProfileView/components/InvertCallStack/index.tsx +4 -5
- package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.test.tsx +192 -94
- package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.ts +21 -21
- package/src/ProfileView/components/Toolbars/MultiLevelDropdown.tsx +28 -24
- package/src/ProfileView/components/Toolbars/TableColumnsDropdown.tsx +5 -4
- package/src/ProfileView/components/Toolbars/index.tsx +3 -3
- package/src/ProfileView/components/ViewSelector/index.tsx +16 -9
- package/src/ProfileView/components/VisualizationContainer/index.tsx +3 -0
- package/src/ProfileView/context/DashboardContext.tsx +6 -6
- package/src/ProfileView/hooks/useResetFlameGraphState.ts +4 -6
- package/src/ProfileView/hooks/useResetStateOnProfileTypeChange.ts +26 -24
- package/src/ProfileView/hooks/useResetStateOnSeriesChange.ts +8 -16
- package/src/ProfileView/hooks/useVisualizationState.ts +69 -61
- package/src/ProfileViewWithData.tsx +35 -29
- package/src/Sandwich/index.tsx +3 -4
- package/src/SourceView/index.tsx +2 -4
- package/src/SourceView/useSelectedLineRange.ts +19 -34
- package/src/Table/MoreDropdown.tsx +11 -9
- package/src/Table/TableContextMenu.tsx +13 -10
- package/src/Table/hooks/useTableConfiguration.tsx +11 -16
- package/src/Table/index.tsx +21 -12
- package/src/TopTable/index.tsx +4 -3
- package/src/hooks/useCompareModeMeta.ts +91 -61
- package/src/hooks/useQueryState.test.tsx +345 -275
- package/src/hooks/useQueryState.ts +118 -136
- package/src/index.tsx +15 -16
- package/src/useDelayedLoader.ts +10 -10
- package/src/useSumBy.ts +15 -21
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.test.js +0 -455
- package/dist/hooks/urlParsers.d.ts +0 -18
- package/dist/hooks/urlParsers.d.ts.map +0 -1
- package/dist/hooks/urlParsers.js +0 -32
- package/dist/hooks/useColorBy.d.ts +0 -5
- package/dist/hooks/useColorBy.d.ts.map +0 -1
- package/dist/hooks/useColorBy.js +0 -26
- package/dist/hooks/useDashboardItems.d.ts +0 -5
- package/dist/hooks/useDashboardItems.d.ts.map +0 -1
- package/dist/hooks/useDashboardItems.js +0 -27
- package/dist/hooks/useQueryState.test.js +0 -868
- package/src/hooks/urlParsers.ts +0 -38
- package/src/hooks/useColorBy.ts +0 -42
- package/src/hooks/useDashboardItems.ts +0 -46
|
@@ -1,3 +1,14 @@
|
|
|
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 _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 }; })(); }
|
|
3
|
+
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); }
|
|
4
|
+
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); }
|
|
5
|
+
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); }); }; }
|
|
6
|
+
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; }
|
|
7
|
+
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; }
|
|
8
|
+
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; }
|
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
10
|
+
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); }
|
|
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,249 @@
|
|
|
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';
|
|
14
26
|
import { selectAutoQuery, setAutoQuery, useAppDispatch, useAppSelector } from '@parca/store';
|
|
15
27
|
import { ProfileSelectionFromParams, SuffixParams } from '..';
|
|
16
28
|
import { constructProfileName } from '../ProfileTypeSelector';
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
export var useAutoQuerySelector = function useAutoQuerySelector(t0) {
|
|
30
|
+
var $ = _c(42);
|
|
31
|
+
var selectedProfileName = t0.selectedProfileName,
|
|
32
|
+
profileTypesData = t0.profileTypesData,
|
|
33
|
+
setProfileName = t0.setProfileName,
|
|
34
|
+
setQueryExpression = t0.setQueryExpression,
|
|
35
|
+
querySelection = t0.querySelection,
|
|
36
|
+
navigateTo = t0.navigateTo,
|
|
37
|
+
loading = t0.loading,
|
|
38
|
+
defaultProfileType = t0.defaultProfileType;
|
|
39
|
+
var autoQuery = useAppSelector(selectAutoQuery);
|
|
40
|
+
var dispatch = useAppDispatch();
|
|
41
|
+
var comparing;
|
|
42
|
+
var expressionA;
|
|
43
|
+
var t1;
|
|
44
|
+
if ($[0] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
45
|
+
var queryParams = new URLSearchParams(location.search);
|
|
46
|
+
var compareA = queryParams.get("compare_a");
|
|
47
|
+
var compareB = queryParams.get("compare_b");
|
|
48
|
+
comparing = compareA === "true" || compareB === "true";
|
|
49
|
+
expressionA = queryParams.get("expression_a");
|
|
50
|
+
t1 = queryParams.get("expression_b");
|
|
51
|
+
$[0] = comparing;
|
|
52
|
+
$[1] = expressionA;
|
|
53
|
+
$[2] = t1;
|
|
54
|
+
} else {
|
|
55
|
+
comparing = $[0];
|
|
56
|
+
expressionA = $[1];
|
|
57
|
+
t1 = $[2];
|
|
58
|
+
}
|
|
59
|
+
var expressionB = t1;
|
|
60
|
+
var hasSetupCompareMode = useRef(false);
|
|
61
|
+
var t2;
|
|
62
|
+
if ($[3] !== loading || $[4] !== navigateTo || $[5] !== querySelection) {
|
|
63
|
+
t2 = function t2() {
|
|
64
|
+
if (loading) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (comparing && expressionA !== null && expressionA !== undefined && expressionB === null && !hasSetupCompareMode.current) {
|
|
68
|
+
var _querySelection$merge, _querySelection$merge2, _queryA$sumBy;
|
|
69
|
+
if (querySelection.expression === undefined) {
|
|
70
|
+
return;
|
|
31
71
|
}
|
|
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
|
-
expression_a: queryA.expression,
|
|
57
|
-
from_a: queryA.from.toString(),
|
|
58
|
-
to_a: queryA.to.toString(),
|
|
59
|
-
time_selection_a: queryA.timeSelection,
|
|
60
|
-
compare_b: 'true',
|
|
61
|
-
expression_b: queryA.expression,
|
|
62
|
-
from_b: queryA.from.toString(),
|
|
63
|
-
to_b: queryA.to.toString(),
|
|
64
|
-
time_selection_b: queryA.timeSelection,
|
|
65
|
-
};
|
|
66
|
-
if (sumBy != null) {
|
|
67
|
-
compareQuery.sum_by_a = sumBy;
|
|
68
|
-
compareQuery.sum_by_b = sumBy;
|
|
69
|
-
}
|
|
70
|
-
if (profileA != null) {
|
|
71
|
-
compareQuery = {
|
|
72
|
-
...SuffixParams(profileA.HistoryParams(), '_a'),
|
|
73
|
-
...compareQuery,
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
hasSetupCompareMode.current = true;
|
|
77
|
-
void navigateTo('/', {
|
|
78
|
-
...compareQuery,
|
|
79
|
-
search_string: '',
|
|
80
|
-
dashboard_items: ['flamegraph'],
|
|
81
|
-
});
|
|
72
|
+
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);
|
|
73
|
+
var queryA = {
|
|
74
|
+
expression: querySelection.expression,
|
|
75
|
+
from: querySelection.from,
|
|
76
|
+
to: querySelection.to,
|
|
77
|
+
timeSelection: querySelection.timeSelection,
|
|
78
|
+
sumBy: querySelection.sumBy
|
|
79
|
+
};
|
|
80
|
+
var sumBy = (_queryA$sumBy = queryA.sumBy) === null || _queryA$sumBy === void 0 ? void 0 : _queryA$sumBy.join(",");
|
|
81
|
+
var compareQuery = {
|
|
82
|
+
compare_a: "true",
|
|
83
|
+
expression_a: queryA.expression,
|
|
84
|
+
from_a: queryA.from.toString(),
|
|
85
|
+
to_a: queryA.to.toString(),
|
|
86
|
+
time_selection_a: queryA.timeSelection,
|
|
87
|
+
compare_b: "true",
|
|
88
|
+
expression_b: queryA.expression,
|
|
89
|
+
from_b: queryA.from.toString(),
|
|
90
|
+
to_b: queryA.to.toString(),
|
|
91
|
+
time_selection_b: queryA.timeSelection
|
|
92
|
+
};
|
|
93
|
+
if (sumBy != null) {
|
|
94
|
+
compareQuery.sum_by_a = sumBy;
|
|
95
|
+
compareQuery.sum_by_b = sumBy;
|
|
82
96
|
}
|
|
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
|
-
|
|
97
|
+
if (profileA != null) {
|
|
98
|
+
compareQuery = _objectSpread(_objectSpread({}, SuffixParams(profileA.HistoryParams(), "_a")), compareQuery);
|
|
99
|
+
}
|
|
100
|
+
hasSetupCompareMode.current = true;
|
|
101
|
+
navigateTo("/", _objectSpread(_objectSpread({}, compareQuery), {}, {
|
|
102
|
+
search_string: "",
|
|
103
|
+
dashboard_items: ["flamegraph"]
|
|
104
|
+
}));
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
$[3] = loading;
|
|
108
|
+
$[4] = navigateTo;
|
|
109
|
+
$[5] = querySelection;
|
|
110
|
+
$[6] = t2;
|
|
111
|
+
} else {
|
|
112
|
+
t2 = $[6];
|
|
113
|
+
}
|
|
114
|
+
var t3;
|
|
115
|
+
if ($[7] !== dispatch || $[8] !== loading || $[9] !== navigateTo || $[10] !== querySelection) {
|
|
116
|
+
t3 = [comparing, querySelection, navigateTo, expressionA, expressionB, dispatch, loading];
|
|
117
|
+
$[7] = dispatch;
|
|
118
|
+
$[8] = loading;
|
|
119
|
+
$[9] = navigateTo;
|
|
120
|
+
$[10] = querySelection;
|
|
121
|
+
$[11] = t3;
|
|
122
|
+
} else {
|
|
123
|
+
t3 = $[11];
|
|
124
|
+
}
|
|
125
|
+
useEffect(t2, t3);
|
|
126
|
+
var t4;
|
|
127
|
+
if ($[12] !== autoQuery || $[13] !== defaultProfileType || $[14] !== dispatch || $[15] !== profileTypesData || $[16] !== selectedProfileName.length || $[17] !== setProfileName) {
|
|
128
|
+
t4 = function t4() {
|
|
129
|
+
_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
130
|
+
var profileType;
|
|
131
|
+
return _regenerator().w(function (_context) {
|
|
132
|
+
while (1) switch (_context.n) {
|
|
133
|
+
case 0:
|
|
134
|
+
if (!(selectedProfileName.length > 0)) {
|
|
135
|
+
_context.n = 1;
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
return _context.a(2);
|
|
139
|
+
case 1:
|
|
140
|
+
if (!((profileTypesData === null || profileTypesData === void 0 ? void 0 : profileTypesData.types) == null || profileTypesData.types.length < 1)) {
|
|
141
|
+
_context.n = 2;
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
return _context.a(2);
|
|
145
|
+
case 2:
|
|
146
|
+
if (!(autoQuery === "true")) {
|
|
147
|
+
_context.n = 3;
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
return _context.a(2);
|
|
151
|
+
case 3:
|
|
152
|
+
dispatch(setAutoQuery("true"));
|
|
153
|
+
if (!(defaultProfileType != null && defaultProfileType.length > 0)) {
|
|
154
|
+
_context.n = 4;
|
|
155
|
+
break;
|
|
156
|
+
}
|
|
157
|
+
setProfileName(defaultProfileType);
|
|
158
|
+
return _context.a(2);
|
|
159
|
+
case 4:
|
|
160
|
+
profileType = profileTypesData.types.find(_temp);
|
|
161
|
+
if (profileType == null) {
|
|
162
|
+
profileType = profileTypesData.types.find(_temp2);
|
|
163
|
+
}
|
|
164
|
+
if (profileType == null) {
|
|
165
|
+
profileType = profileTypesData.types.find(_temp3);
|
|
166
|
+
}
|
|
167
|
+
if (profileType == null) {
|
|
168
|
+
profileType = profileTypesData.types.find(_temp4);
|
|
169
|
+
}
|
|
170
|
+
if (profileType == null) {
|
|
171
|
+
profileType = profileTypesData.types.find(_temp5);
|
|
172
|
+
}
|
|
173
|
+
if (profileType == null) {
|
|
116
174
|
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
|
-
|
|
175
|
+
}
|
|
176
|
+
setProfileName(constructProfileName(profileType));
|
|
177
|
+
case 5:
|
|
178
|
+
return _context.a(2);
|
|
179
|
+
}
|
|
180
|
+
}, _callee);
|
|
181
|
+
}))();
|
|
182
|
+
};
|
|
183
|
+
$[12] = autoQuery;
|
|
184
|
+
$[13] = defaultProfileType;
|
|
185
|
+
$[14] = dispatch;
|
|
186
|
+
$[15] = profileTypesData;
|
|
187
|
+
$[16] = selectedProfileName.length;
|
|
188
|
+
$[17] = setProfileName;
|
|
189
|
+
$[18] = t4;
|
|
190
|
+
} else {
|
|
191
|
+
t4 = $[18];
|
|
192
|
+
}
|
|
193
|
+
var t5;
|
|
194
|
+
if ($[19] !== autoQuery || $[20] !== defaultProfileType || $[21] !== dispatch || $[22] !== profileTypesData || $[23] !== selectedProfileName || $[24] !== setProfileName || $[25] !== setQueryExpression) {
|
|
195
|
+
t5 = [profileTypesData, selectedProfileName, autoQuery, dispatch, setQueryExpression, setProfileName, defaultProfileType];
|
|
196
|
+
$[19] = autoQuery;
|
|
197
|
+
$[20] = defaultProfileType;
|
|
198
|
+
$[21] = dispatch;
|
|
199
|
+
$[22] = profileTypesData;
|
|
200
|
+
$[23] = selectedProfileName;
|
|
201
|
+
$[24] = setProfileName;
|
|
202
|
+
$[25] = setQueryExpression;
|
|
203
|
+
$[26] = t5;
|
|
204
|
+
} else {
|
|
205
|
+
t5 = $[26];
|
|
206
|
+
}
|
|
207
|
+
useEffect(t4, t5);
|
|
208
|
+
var t6;
|
|
209
|
+
if ($[27] !== autoQuery || $[28] !== dispatch || $[29] !== loading || $[30] !== profileTypesData || $[31] !== selectedProfileName.length || $[32] !== setQueryExpression) {
|
|
210
|
+
t6 = function t6() {
|
|
211
|
+
_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
212
|
+
return _regenerator().w(function (_context2) {
|
|
213
|
+
while (1) switch (_context2.n) {
|
|
214
|
+
case 0:
|
|
215
|
+
if (!(autoQuery !== "true" || (profileTypesData === null || profileTypesData === void 0 ? void 0 : profileTypesData.types) == null || profileTypesData.types.length < 1 || selectedProfileName.length === 0 || loading)) {
|
|
216
|
+
_context2.n = 1;
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
return _context2.a(2);
|
|
220
|
+
case 1:
|
|
221
|
+
setQueryExpression();
|
|
222
|
+
dispatch(setAutoQuery("false"));
|
|
223
|
+
case 2:
|
|
224
|
+
return _context2.a(2);
|
|
225
|
+
}
|
|
226
|
+
}, _callee2);
|
|
227
|
+
}))();
|
|
228
|
+
};
|
|
229
|
+
$[27] = autoQuery;
|
|
230
|
+
$[28] = dispatch;
|
|
231
|
+
$[29] = loading;
|
|
232
|
+
$[30] = profileTypesData;
|
|
233
|
+
$[31] = selectedProfileName.length;
|
|
234
|
+
$[32] = setQueryExpression;
|
|
235
|
+
$[33] = t6;
|
|
236
|
+
} else {
|
|
237
|
+
t6 = $[33];
|
|
238
|
+
}
|
|
239
|
+
var t7;
|
|
240
|
+
if ($[34] !== autoQuery || $[35] !== dispatch || $[36] !== loading || $[37] !== profileTypesData || $[38] !== selectedProfileName || $[39] !== setProfileName || $[40] !== setQueryExpression) {
|
|
241
|
+
t7 = [profileTypesData, setQueryExpression, autoQuery, setProfileName, dispatch, selectedProfileName, loading];
|
|
242
|
+
$[34] = autoQuery;
|
|
243
|
+
$[35] = dispatch;
|
|
244
|
+
$[36] = loading;
|
|
245
|
+
$[37] = profileTypesData;
|
|
246
|
+
$[38] = selectedProfileName;
|
|
247
|
+
$[39] = setProfileName;
|
|
248
|
+
$[40] = setQueryExpression;
|
|
249
|
+
$[41] = t7;
|
|
250
|
+
} else {
|
|
251
|
+
t7 = $[41];
|
|
252
|
+
}
|
|
253
|
+
useEffect(t6, t7);
|
|
150
254
|
};
|
|
255
|
+
function _temp(type) {
|
|
256
|
+
return type.name === "parca_agent" && type.sampleType === "samples" && type.delta;
|
|
257
|
+
}
|
|
258
|
+
function _temp2(type_0) {
|
|
259
|
+
return type_0.name === "go_opentelemetry_io_ebpf_profiler" && type_0.delta;
|
|
260
|
+
}
|
|
261
|
+
function _temp3(type_1) {
|
|
262
|
+
return type_1.name === "otel_profiling_agent_on_cpu" && type_1.delta;
|
|
263
|
+
}
|
|
264
|
+
function _temp4(type_2) {
|
|
265
|
+
return type_2.name === "parca_agent_cpu" && type_2.delta;
|
|
266
|
+
}
|
|
267
|
+
function _temp5(type_3) {
|
|
268
|
+
return type_3.name === "process_cpu" && type_3.delta;
|
|
269
|
+
}
|