@parca/profile 0.16.0 β†’ 0.16.43

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.
Files changed (98) hide show
  1. package/CHANGELOG.md +52 -25
  2. package/dist/Callgraph/Edge/index.d.ts +23 -0
  3. package/dist/Callgraph/Edge/index.js +30 -0
  4. package/dist/Callgraph/Node/index.d.ts +20 -0
  5. package/dist/Callgraph/Node/index.js +37 -0
  6. package/dist/Callgraph/index.d.ts +9 -0
  7. package/dist/Callgraph/index.js +137 -0
  8. package/dist/Callgraph/mockData/index.d.ts +148 -0
  9. package/dist/Callgraph/mockData/index.js +577 -0
  10. package/dist/Callgraph/utils.d.ts +19 -0
  11. package/dist/Callgraph/utils.js +82 -0
  12. package/dist/GraphTooltip/index.d.ts +20 -0
  13. package/dist/GraphTooltip/index.js +155 -0
  14. package/dist/IcicleGraph.d.ts +36 -0
  15. package/dist/IcicleGraph.js +158 -0
  16. package/dist/MatchersInput/index.d.ts +24 -0
  17. package/dist/MatchersInput/index.js +479 -0
  18. package/dist/MetricsCircle/index.d.ts +8 -0
  19. package/dist/MetricsCircle/index.js +18 -0
  20. package/dist/MetricsGraph/index.d.ts +36 -0
  21. package/dist/MetricsGraph/index.js +327 -0
  22. package/dist/MetricsSeries/index.d.ts +12 -0
  23. package/dist/MetricsSeries/index.js +21 -0
  24. package/dist/ProfileExplorer/ProfileExplorerCompare.d.ts +20 -0
  25. package/dist/ProfileExplorer/ProfileExplorerCompare.js +38 -0
  26. package/dist/ProfileExplorer/ProfileExplorerSingle.d.ts +16 -0
  27. package/dist/ProfileExplorer/ProfileExplorerSingle.js +19 -0
  28. package/dist/ProfileExplorer/index.d.ts +10 -0
  29. package/dist/ProfileExplorer/index.js +203 -0
  30. package/dist/ProfileIcicleGraph.d.ts +11 -0
  31. package/dist/ProfileIcicleGraph.js +28 -0
  32. package/dist/ProfileMetricsGraph/index.d.ts +23 -0
  33. package/dist/ProfileMetricsGraph/index.js +127 -0
  34. package/dist/ProfileSVG.module.css +3 -0
  35. package/dist/ProfileSelector/CompareButton.d.ts +6 -0
  36. package/dist/ProfileSelector/CompareButton.js +41 -0
  37. package/dist/ProfileSelector/MergeButton.d.ts +6 -0
  38. package/dist/ProfileSelector/MergeButton.js +41 -0
  39. package/dist/ProfileSelector/index.d.ts +30 -0
  40. package/dist/ProfileSelector/index.js +133 -0
  41. package/dist/ProfileSource.d.ts +89 -0
  42. package/dist/ProfileSource.js +239 -0
  43. package/dist/ProfileTypeSelector/index.d.ts +21 -0
  44. package/dist/ProfileTypeSelector/index.js +138 -0
  45. package/dist/ProfileView.d.ts +40 -0
  46. package/dist/ProfileView.js +111 -0
  47. package/dist/ProfileView.styles.css +3 -0
  48. package/dist/ProfileViewWithData.d.ts +12 -0
  49. package/dist/ProfileViewWithData.js +116 -0
  50. package/dist/TopTable.d.ts +10 -0
  51. package/dist/TopTable.js +140 -0
  52. package/dist/TopTable.styles.css +7 -0
  53. package/dist/components/DiffLegend.d.ts +3 -0
  54. package/dist/components/DiffLegend.js +62 -0
  55. package/dist/components/ProfileShareButton/ResultBox.d.ts +7 -0
  56. package/dist/components/ProfileShareButton/ResultBox.js +46 -0
  57. package/dist/components/ProfileShareButton/index.d.ts +8 -0
  58. package/dist/components/ProfileShareButton/index.js +119 -0
  59. package/dist/index.d.ts +13 -0
  60. package/dist/index.js +64 -0
  61. package/dist/stories/ProfileTypeSelector.stories.d.ts +5 -0
  62. package/dist/stories/ProfileTypeSelector.stories.js +77 -0
  63. package/dist/stories/ProfileView.stories.d.ts +5 -0
  64. package/dist/stories/ProfileView.stories.js +22 -0
  65. package/dist/stories/mockdata/flamegraphData.json +7960 -0
  66. package/dist/styles.css +1 -0
  67. package/dist/useDelayedLoader.d.ts +5 -0
  68. package/dist/useDelayedLoader.js +33 -0
  69. package/dist/useQuery.d.ts +13 -0
  70. package/dist/useQuery.js +41 -0
  71. package/dist/utils.d.ts +4 -0
  72. package/dist/utils.js +83 -0
  73. package/package.json +13 -8
  74. package/src/Callgraph/Edge/index.tsx +59 -0
  75. package/src/Callgraph/Node/index.tsx +66 -0
  76. package/src/Callgraph/index.tsx +169 -0
  77. package/src/Callgraph/mockData/index.ts +605 -0
  78. package/src/Callgraph/utils.ts +116 -0
  79. package/src/GraphTooltip/index.tsx +340 -0
  80. package/src/IcicleGraph.tsx +28 -8
  81. package/src/MatchersInput/index.tsx +698 -0
  82. package/src/MetricsCircle/index.tsx +28 -0
  83. package/src/MetricsGraph/index.tsx +589 -0
  84. package/src/MetricsSeries/index.tsx +38 -0
  85. package/src/ProfileExplorer/ProfileExplorerCompare.tsx +109 -0
  86. package/src/ProfileExplorer/ProfileExplorerSingle.tsx +72 -0
  87. package/src/ProfileExplorer/index.tsx +377 -0
  88. package/src/ProfileMetricsGraph/index.tsx +143 -0
  89. package/src/ProfileSelector/CompareButton.tsx +72 -0
  90. package/src/ProfileSelector/MergeButton.tsx +72 -0
  91. package/src/ProfileSelector/index.tsx +270 -0
  92. package/src/ProfileTypeSelector/index.tsx +180 -0
  93. package/src/ProfileView.tsx +2 -7
  94. package/src/index.tsx +11 -0
  95. package/src/useQuery.tsx +1 -0
  96. package/tailwind.config.js +8 -0
  97. package/tsconfig.json +7 -3
  98. package/typings.d.ts +14 -0
@@ -0,0 +1,119 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (_) try {
28
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
48
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
49
+ // Copyright 2022 The Parca Authors
50
+ // Licensed under the Apache License, Version 2.0 (the "License");
51
+ // you may not use this file except in compliance with the License.
52
+ // You may obtain a copy of the License at
53
+ //
54
+ // http://www.apache.org/licenses/LICENSE-2.0
55
+ //
56
+ // Unless required by applicable law or agreed to in writing, software
57
+ // distributed under the License is distributed on an "AS IS" BASIS,
58
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
59
+ // See the License for the specific language governing permissions and
60
+ // limitations under the License.
61
+ import { useState } from 'react';
62
+ import { Button, Modal, useGrpcMetadata } from '@parca/components';
63
+ import { Icon } from '@iconify/react';
64
+ import ResultBox from './ResultBox';
65
+ var ProfileShareModal = function (_a) {
66
+ var isOpen = _a.isOpen, closeModal = _a.closeModal, queryRequest = _a.queryRequest, queryClient = _a.queryClient;
67
+ var _b = useState(false), isShared = _b[0], setIsShared = _b[1];
68
+ var _c = useState(false), loading = _c[0], setLoading = _c[1];
69
+ var _d = useState(''), error = _d[0], setError = _d[1];
70
+ var _e = useState(''), description = _e[0], setDescription = _e[1];
71
+ var _f = useState(''), sharedLink = _f[0], setSharedLink = _f[1];
72
+ var metadata = useGrpcMetadata();
73
+ var isFormDataValid = function () { return true; };
74
+ var handleSubmit = function () { return __awaiter(void 0, void 0, void 0, function () {
75
+ var response, err_1;
76
+ return __generator(this, function (_a) {
77
+ switch (_a.label) {
78
+ case 0:
79
+ _a.trys.push([0, 2, , 3]);
80
+ setLoading(true);
81
+ return [4 /*yield*/, queryClient.shareProfile({ queryRequest: queryRequest, description: description }, { meta: metadata })];
82
+ case 1:
83
+ response = (_a.sent()).response;
84
+ setSharedLink(response.link);
85
+ setLoading(false);
86
+ setIsShared(true);
87
+ return [3 /*break*/, 3];
88
+ case 2:
89
+ err_1 = _a.sent();
90
+ if (err_1 instanceof Error) {
91
+ console.error(err_1);
92
+ setLoading(false);
93
+ // https://github.com/microsoft/TypeScript/issues/38347
94
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
95
+ setError(err_1.toString());
96
+ }
97
+ return [3 /*break*/, 3];
98
+ case 3: return [2 /*return*/];
99
+ }
100
+ });
101
+ }); };
102
+ var onClose = function () {
103
+ setLoading(false);
104
+ setError('');
105
+ setDescription('');
106
+ setIsShared(false);
107
+ closeModal();
108
+ };
109
+ return (_jsx(Modal, __assign({ isOpen: isOpen, closeModal: onClose, title: "Share Profile", className: "w-[420px]" }, { children: _jsxs("form", __assign({ className: "py-2" }, { children: [_jsx("p", __assign({ className: "text-sm text-gray-500 dark:text-gray-300" }, { children: "Note: Shared profiles can be accessed by anyone with the link, even from people outside your organisation." })), !isShared || (error === null || error === void 0 ? void 0 : error.length) > 0 ? (_jsxs(_Fragment, { children: [_jsx("p", __assign({ className: "text-sm text-gray-500 dark:text-gray-300 mt-3 mb-2" }, { children: "Enter a description (optional)" })), _jsx("textarea", { className: "border w-full text-gray-500 dark:text-gray-300 bg-inherit text-sm px-2 py-2", value: description, onChange: function (e) { return setDescription(e.target.value); } }), _jsx(Button, __assign({ className: "w-fit mt-4", onClick: function (e) {
110
+ e.preventDefault();
111
+ void handleSubmit();
112
+ }, disabled: loading || !isFormDataValid(), type: "submit" }, { children: loading ? 'Sharing' : 'Share' })), error !== '' ? _jsx("p", { children: "Something went wrong please try again" }) : null] })) : (_jsxs(_Fragment, { children: [_jsx(ResultBox, { value: sharedLink, className: "mt-4" }), _jsx("div", __assign({ className: "flex justify-center mt-8" }, { children: _jsx(Button, __assign({ variant: "neutral", className: "w-fit", onClick: onClose }, { children: "Close" })) }))] }))] })) })));
113
+ };
114
+ var ProfileShareButton = function (_a) {
115
+ var queryRequest = _a.queryRequest, queryClient = _a.queryClient;
116
+ var _b = useState(false), isOpen = _b[0], setIsOpen = _b[1];
117
+ return (_jsxs(_Fragment, { children: [_jsx(Button, __assign({ color: "neutral", className: "w-fit", onClick: function () { return setIsOpen(true); } }, { children: _jsx(Icon, { icon: "ei:share-apple", width: 20 }) })), _jsx(ProfileShareModal, { isOpen: isOpen, closeModal: function () { return setIsOpen(false); }, queryRequest: queryRequest, queryClient: queryClient })] }));
118
+ };
119
+ export default ProfileShareButton;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import type { Props as CallgraphProps } from '@parca/profile/src/Callgraph';
3
+ import ProfileExplorer from './ProfileExplorer';
4
+ import ProfileTypeSelector from './ProfileTypeSelector';
5
+ export * from './IcicleGraph';
6
+ export * from './ProfileIcicleGraph';
7
+ export * from './ProfileSource';
8
+ export * from './ProfileView';
9
+ export * from './ProfileViewWithData';
10
+ export * from './utils';
11
+ export type { CallgraphProps };
12
+ declare const Callgraph: React.LazyExoticComponent<({ graph, sampleUnit, width }: CallgraphProps) => JSX.Element>;
13
+ export { Callgraph, ProfileExplorer, ProfileTypeSelector };
package/dist/index.js ADDED
@@ -0,0 +1,64 @@
1
+ // Copyright 2022 The Parca Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
+ return new (P || (P = Promise))(function (resolve, reject) {
16
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
17
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
20
+ });
21
+ };
22
+ var __generator = (this && this.__generator) || function (thisArg, body) {
23
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
24
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
+ function verb(n) { return function (v) { return step([n, v]); }; }
26
+ function step(op) {
27
+ if (f) throw new TypeError("Generator is already executing.");
28
+ while (_) try {
29
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
30
+ if (y = 0, t) op = [op[0] & 2, t.value];
31
+ switch (op[0]) {
32
+ case 0: case 1: t = op; break;
33
+ case 4: _.label++; return { value: op[1], done: false };
34
+ case 5: _.label++; y = op[1]; op = [0]; continue;
35
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
36
+ default:
37
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
38
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
39
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
40
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
41
+ if (t[2]) _.ops.pop();
42
+ _.trys.pop(); continue;
43
+ }
44
+ op = body.call(thisArg, _);
45
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
46
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
+ }
48
+ };
49
+ import React from 'react';
50
+ import ProfileExplorer from './ProfileExplorer';
51
+ import ProfileTypeSelector from './ProfileTypeSelector';
52
+ export * from './IcicleGraph';
53
+ export * from './ProfileIcicleGraph';
54
+ export * from './ProfileSource';
55
+ export * from './ProfileView';
56
+ export * from './ProfileViewWithData';
57
+ export * from './utils';
58
+ var Callgraph = React.lazy(function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
59
+ switch (_a.label) {
60
+ case 0: return [4 /*yield*/, import('@parca/profile/src/Callgraph')];
61
+ case 1: return [2 /*return*/, _a.sent()];
62
+ }
63
+ }); }); });
64
+ export { Callgraph, ProfileExplorer, ProfileTypeSelector };
@@ -0,0 +1,5 @@
1
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
2
+ import ProfileTypeSelector from '../ProfileTypeSelector';
3
+ declare const _default: ComponentMeta<({ profileTypesData, loading, error, selectedKey, onSelection, flexibleKnownProfilesDetection, }: import("../ProfileTypeSelector").Props) => JSX.Element>;
4
+ export default _default;
5
+ export declare const Primary: ComponentStory<typeof ProfileTypeSelector>;
@@ -0,0 +1,77 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import ProfileTypeSelector from '../ProfileTypeSelector';
3
+ export default {
4
+ /* πŸ‘‡ The title prop is optional.
5
+ * See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
6
+ * to learn how to generate automatic titles
7
+ */
8
+ title: 'Components/ProfileTypeSelector',
9
+ component: ProfileTypeSelector,
10
+ };
11
+ const profileTypes = {
12
+ types: [
13
+ {
14
+ name: 'memory',
15
+ sampleType: 'inuse_objects',
16
+ sampleUnit: 'count',
17
+ periodType: 'space',
18
+ periodUnit: 'bytes',
19
+ delta: false,
20
+ },
21
+ {
22
+ name: 'memory',
23
+ sampleType: 'inuse_space',
24
+ sampleUnit: 'bytes',
25
+ periodType: 'space',
26
+ periodUnit: 'bytes',
27
+ delta: false,
28
+ },
29
+ {
30
+ name: 'memory',
31
+ sampleType: 'alloc_objects',
32
+ sampleUnit: 'count',
33
+ periodType: 'space',
34
+ periodUnit: 'bytes',
35
+ delta: false,
36
+ },
37
+ {
38
+ name: 'goroutine',
39
+ sampleType: 'goroutine',
40
+ sampleUnit: 'count',
41
+ periodType: 'goroutine',
42
+ periodUnit: 'count',
43
+ delta: false,
44
+ },
45
+ {
46
+ name: 'memory',
47
+ sampleType: 'alloc_space',
48
+ sampleUnit: 'bytes',
49
+ periodType: 'space',
50
+ periodUnit: 'bytes',
51
+ delta: false,
52
+ },
53
+ {
54
+ name: 'process_cpu',
55
+ sampleType: 'cpu',
56
+ sampleUnit: 'nanoseconds',
57
+ periodType: 'cpu',
58
+ periodUnit: 'nanoseconds',
59
+ delta: true,
60
+ },
61
+ {
62
+ name: 'process_cpu',
63
+ sampleType: 'samples',
64
+ sampleUnit: 'count',
65
+ periodType: 'cpu',
66
+ periodUnit: 'nanoseconds',
67
+ delta: true,
68
+ },
69
+ ],
70
+ };
71
+ const onSelection = () => { };
72
+ //πŸ‘‡ We create a β€œtemplate” of how args map to rendering
73
+ // const Template: ComponentStory<typeof ProfileView> = args => <ProfileView {...args} />;
74
+ //πŸ‘‡ Each story then reuses that template
75
+ // export const Primary = Template.bind({});
76
+ // Primary.args = {sampleUnit: 'count', label: 'Button'};
77
+ export const Primary = () => (_jsx(ProfileTypeSelector, { profileTypesData: profileTypes, onSelection: onSelection, selectedKey: "process_cpu:samples:count:cpu:nanoseconds:delta", error: undefined }));
@@ -0,0 +1,5 @@
1
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
2
+ import { ProfileView } from '../ProfileView';
3
+ declare const _default: ComponentMeta<({ flamegraphData, topTableData, callgraphData, sampleUnit, profileSource, queryClient, navigateTo, profileVisState, onDownloadPProf, }: import("../ProfileView").ProfileViewProps) => JSX.Element>;
4
+ export default _default;
5
+ export declare const Primary: ComponentStory<typeof ProfileView>;
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ProfileView } from '../ProfileView';
3
+ import flamegraphData from './mockdata/flamegraphData.json';
4
+ export default {
5
+ /* πŸ‘‡ The title prop is optional.
6
+ * See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
7
+ * to learn how to generate automatic titles
8
+ */
9
+ title: 'Components/ProfileView',
10
+ component: ProfileView,
11
+ };
12
+ const mockVisState = {
13
+ currentView: 'icicle',
14
+ setCurrentView: () => { },
15
+ };
16
+ const downloadPprof = () => { };
17
+ //πŸ‘‡ We create a β€œtemplate” of how args map to rendering
18
+ // const Template: ComponentStory<typeof ProfileView> = args => <ProfileView {...args} />;
19
+ //πŸ‘‡ Each story then reuses that template
20
+ // export const Primary = Template.bind({});
21
+ // Primary.args = {sampleUnit: 'count', label: 'Button'};
22
+ export const Primary = () => (_jsx(ProfileView, { flamegraphData: flamegraphData, sampleUnit: "count", profileVisState: mockVisState, onDownloadPProf: downloadPprof }));