@atlaspack/profiler 2.14.1-canary.42 → 2.14.1-canary.421

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 CHANGED
@@ -1,5 +1,340 @@
1
1
  # @atlaspack/profiler
2
2
 
3
+ ## 2.15.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @atlaspack/logger@2.14.39
9
+ - @atlaspack/utils@3.2.8
10
+ - @atlaspack/types-internal@2.22.4
11
+
12
+ ## 2.15.7
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [[`02cc8b3`](https://github.com/atlassian-labs/atlaspack/commit/02cc8b32c06ca6b51806b33f6f707ca06e55e957)]:
17
+ - @atlaspack/types-internal@2.22.3
18
+ - @atlaspack/logger@2.14.38
19
+ - @atlaspack/utils@3.2.7
20
+
21
+ ## 2.15.6
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies []:
26
+ - @atlaspack/types-internal@2.22.2
27
+ - @atlaspack/utils@3.2.6
28
+ - @atlaspack/logger@2.14.37
29
+
30
+ ## 2.15.5
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies []:
35
+ - @atlaspack/logger@2.14.36
36
+ - @atlaspack/utils@3.2.5
37
+ - @atlaspack/types-internal@2.22.1
38
+
39
+ ## 2.15.4
40
+
41
+ ### Patch Changes
42
+
43
+ - Updated dependencies [[`00fa643`](https://github.com/atlassian-labs/atlaspack/commit/00fa6433202bfd3311479f6314c9ec878a789f2c)]:
44
+ - @atlaspack/types-internal@2.22.0
45
+ - @atlaspack/logger@2.14.35
46
+ - @atlaspack/utils@3.2.4
47
+
48
+ ## 2.15.3
49
+
50
+ ### Patch Changes
51
+
52
+ - Updated dependencies []:
53
+ - @atlaspack/logger@2.14.34
54
+ - @atlaspack/utils@3.2.3
55
+ - @atlaspack/types-internal@2.21.3
56
+
57
+ ## 2.15.2
58
+
59
+ ### Patch Changes
60
+
61
+ - Updated dependencies []:
62
+ - @atlaspack/logger@2.14.33
63
+ - @atlaspack/utils@3.2.2
64
+ - @atlaspack/types-internal@2.21.2
65
+
66
+ ## 2.15.1
67
+
68
+ ### Patch Changes
69
+
70
+ - Updated dependencies []:
71
+ - @atlaspack/logger@2.14.32
72
+ - @atlaspack/utils@3.2.1
73
+ - @atlaspack/types-internal@2.21.1
74
+
75
+ ## 2.15.0
76
+
77
+ ### Minor Changes
78
+
79
+ - [#892](https://github.com/atlassian-labs/atlaspack/pull/892) [`617a318`](https://github.com/atlassian-labs/atlaspack/commit/617a318ddc9419b38360257353fec50b9051ee13) Thanks [@marcins](https://github.com/marcins)! - Added a new `shouldProfileNative` option that provides a way to pause and connect a native profiler to Atlaspack.
80
+
81
+ ### Patch Changes
82
+
83
+ - Updated dependencies [[`8eb84ee`](https://github.com/atlassian-labs/atlaspack/commit/8eb84ee61a42bfe87c58079b610802b07a6a13e4), [`73168c2`](https://github.com/atlassian-labs/atlaspack/commit/73168c275a5d9abff9907bcf536b340bca1ed5f0), [`617a318`](https://github.com/atlassian-labs/atlaspack/commit/617a318ddc9419b38360257353fec50b9051ee13)]:
84
+ - @atlaspack/types-internal@2.21.0
85
+ - @atlaspack/utils@3.2.0
86
+ - @atlaspack/logger@2.14.31
87
+
88
+ ## 2.14.35
89
+
90
+ ### Patch Changes
91
+
92
+ - Updated dependencies []:
93
+ - @atlaspack/types-internal@2.20.8
94
+
95
+ ## 2.14.34
96
+
97
+ ### Patch Changes
98
+
99
+ - Updated dependencies []:
100
+ - @atlaspack/types-internal@2.20.7
101
+
102
+ ## 2.14.33
103
+
104
+ ### Patch Changes
105
+
106
+ - Updated dependencies []:
107
+ - @atlaspack/types-internal@2.20.6
108
+
109
+ ## 2.14.32
110
+
111
+ ### Patch Changes
112
+
113
+ - Updated dependencies [[`c372f3f`](https://github.com/atlassian-labs/atlaspack/commit/c372f3fd6fce8200d5cf47f41bc7895c6cbb5558)]:
114
+ - @atlaspack/types-internal@2.20.5
115
+
116
+ ## 2.14.31
117
+
118
+ ### Patch Changes
119
+
120
+ - Updated dependencies []:
121
+ - @atlaspack/types-internal@2.20.4
122
+
123
+ ## 2.14.30
124
+
125
+ ### Patch Changes
126
+
127
+ - Updated dependencies []:
128
+ - @atlaspack/types-internal@2.20.3
129
+
130
+ ## 2.14.29
131
+
132
+ ### Patch Changes
133
+
134
+ - Updated dependencies []:
135
+ - @atlaspack/types-internal@2.20.2
136
+
137
+ ## 2.14.28
138
+
139
+ ### Patch Changes
140
+
141
+ - [#785](https://github.com/atlassian-labs/atlaspack/pull/785) [`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922) Thanks [@matt-koko](https://github.com/matt-koko)! - We need to re-publish every package in Atlaspack with the corrected types field.
142
+
143
+ - Updated dependencies [[`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922)]:
144
+ - @atlaspack/diagnostic@2.14.4
145
+ - @atlaspack/types-internal@2.20.1
146
+ - @atlaspack/events@2.14.4
147
+
148
+ ## 2.14.27
149
+
150
+ ### Patch Changes
151
+
152
+ - Updated dependencies [[`eedcbc4`](https://github.com/atlassian-labs/atlaspack/commit/eedcbc408fc1e86a2a8e25f1a41c57146d8529e1), [`f6532d7`](https://github.com/atlassian-labs/atlaspack/commit/f6532d7a4f7f007bd4e5e36af04dd466f0b9f572)]:
153
+ - @atlaspack/types-internal@2.20.0
154
+
155
+ ## 2.14.26
156
+
157
+ ### Patch Changes
158
+
159
+ - Updated dependencies []:
160
+ - @atlaspack/types-internal@2.19.5
161
+
162
+ ## 2.14.25
163
+
164
+ ### Patch Changes
165
+
166
+ - Updated dependencies []:
167
+ - @atlaspack/types-internal@2.19.4
168
+
169
+ ## 2.14.24
170
+
171
+ ### Patch Changes
172
+
173
+ - Updated dependencies []:
174
+ - @atlaspack/types-internal@2.19.3
175
+
176
+ ## 2.14.23
177
+
178
+ ### Patch Changes
179
+
180
+ - [#742](https://github.com/atlassian-labs/atlaspack/pull/742) [`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd) Thanks [@yamadapc](https://github.com/yamadapc)! - Internal changes and bug fixes to environmentDeduplication flag
181
+
182
+ - Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd)]:
183
+ - @atlaspack/types-internal@2.19.2
184
+ - @atlaspack/diagnostic@2.14.3
185
+ - @atlaspack/events@2.14.3
186
+
187
+ ## 2.14.22
188
+
189
+ ### Patch Changes
190
+
191
+ - Updated dependencies []:
192
+ - @atlaspack/types-internal@2.19.1
193
+
194
+ ## 2.14.21
195
+
196
+ ### Patch Changes
197
+
198
+ - Updated dependencies [[`7f5841c`](https://github.com/atlassian-labs/atlaspack/commit/7f5841c39df049f9546cccbeea2a7337e0337b45)]:
199
+ - @atlaspack/types-internal@2.19.0
200
+
201
+ ## 2.14.20
202
+
203
+ ### Patch Changes
204
+
205
+ - Updated dependencies [[`23d561e`](https://github.com/atlassian-labs/atlaspack/commit/23d561e51e68b0c38fd1ff4e4fb173e5e7b01cf2)]:
206
+ - @atlaspack/types-internal@2.18.0
207
+
208
+ ## 2.14.19
209
+
210
+ ### Patch Changes
211
+
212
+ - [#720](https://github.com/atlassian-labs/atlaspack/pull/720) [`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94) Thanks [@alshdavid](https://github.com/alshdavid)! - Migrate to TypeScript
213
+
214
+ - Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94), [`43fdd22`](https://github.com/atlassian-labs/atlaspack/commit/43fdd223860fbc97af17d68c65419b97412cb888)]:
215
+ - @atlaspack/types-internal@2.17.0
216
+ - @atlaspack/diagnostic@2.14.2
217
+ - @atlaspack/events@2.14.2
218
+
219
+ ## 2.14.18
220
+
221
+ ### Patch Changes
222
+
223
+ - Updated dependencies [[`069de47`](https://github.com/atlassian-labs/atlaspack/commit/069de478e64fb5889f6f2ce023eb510782767fbd)]:
224
+ - @atlaspack/types-internal@2.16.0
225
+
226
+ ## 2.14.17
227
+
228
+ ### Patch Changes
229
+
230
+ - Updated dependencies []:
231
+ - @atlaspack/types-internal@2.15.2
232
+
233
+ ## 2.14.16
234
+
235
+ ### Patch Changes
236
+
237
+ - Updated dependencies []:
238
+ - @atlaspack/types-internal@2.15.1
239
+
240
+ ## 2.14.15
241
+
242
+ ### Patch Changes
243
+
244
+ - Updated dependencies [[`18a57cf`](https://github.com/atlassian-labs/atlaspack/commit/18a57cf8a4789b2de5ad8e2676f317a26cc91417)]:
245
+ - @atlaspack/types-internal@2.15.0
246
+
247
+ ## 2.14.14
248
+
249
+ ### Patch Changes
250
+
251
+ - Updated dependencies []:
252
+ - @atlaspack/types-internal@2.14.14
253
+
254
+ ## 2.14.13
255
+
256
+ ### Patch Changes
257
+
258
+ - Updated dependencies []:
259
+ - @atlaspack/types-internal@2.14.13
260
+
261
+ ## 2.14.12
262
+
263
+ ### Patch Changes
264
+
265
+ - Updated dependencies []:
266
+ - @atlaspack/types-internal@2.14.12
267
+
268
+ ## 2.14.11
269
+
270
+ ### Patch Changes
271
+
272
+ - Updated dependencies []:
273
+ - @atlaspack/types-internal@2.14.11
274
+
275
+ ## 2.14.10
276
+
277
+ ### Patch Changes
278
+
279
+ - Updated dependencies []:
280
+ - @atlaspack/types-internal@2.14.10
281
+
282
+ ## 2.14.9
283
+
284
+ ### Patch Changes
285
+
286
+ - Updated dependencies []:
287
+ - @atlaspack/types-internal@2.14.9
288
+
289
+ ## 2.14.8
290
+
291
+ ### Patch Changes
292
+
293
+ - Updated dependencies [[`51aba5f`](https://github.com/atlassian-labs/atlaspack/commit/51aba5fc0e49235ee06bbc3c376f48c3e7da5c4b)]:
294
+ - @atlaspack/types-internal@2.14.8
295
+
296
+ ## 2.14.7
297
+
298
+ ### Patch Changes
299
+
300
+ - Updated dependencies []:
301
+ - @atlaspack/types-internal@2.14.7
302
+
303
+ ## 2.14.6
304
+
305
+ ### Patch Changes
306
+
307
+ - Updated dependencies []:
308
+ - @atlaspack/types-internal@2.14.6
309
+
310
+ ## 2.14.5
311
+
312
+ ### Patch Changes
313
+
314
+ - Updated dependencies []:
315
+ - @atlaspack/types-internal@2.14.5
316
+
317
+ ## 2.14.4
318
+
319
+ ### Patch Changes
320
+
321
+ - Updated dependencies []:
322
+ - @atlaspack/types-internal@2.14.4
323
+
324
+ ## 2.14.3
325
+
326
+ ### Patch Changes
327
+
328
+ - Updated dependencies []:
329
+ - @atlaspack/types-internal@2.14.3
330
+
331
+ ## 2.14.2
332
+
333
+ ### Patch Changes
334
+
335
+ - Updated dependencies []:
336
+ - @atlaspack/types-internal@2.14.2
337
+
3
338
  ## 2.14.1
4
339
 
5
340
  ### Patch Changes
@@ -0,0 +1,205 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const utils_1 = require("@atlaspack/utils");
7
+ const logger_1 = __importDefault(require("@atlaspack/logger"));
8
+ const readline_1 = __importDefault(require("readline"));
9
+ const chalk_1 = __importDefault(require("chalk"));
10
+ const child_process_1 = require("child_process");
11
+ const util_1 = require("util");
12
+ const execAsync = (0, util_1.promisify)(child_process_1.exec);
13
+ class NativeProfiler {
14
+ startProfiling(profilerType) {
15
+ const pid = process.pid;
16
+ const timeId = (0, utils_1.getTimeId)();
17
+ let filename;
18
+ let command;
19
+ logger_1.default.info({
20
+ origin: '@atlaspack/profiler',
21
+ message: 'Starting native profiling...',
22
+ });
23
+ if (profilerType === 'instruments') {
24
+ filename = `native-profile-${timeId}.trace`;
25
+ command = `xcrun xctrace record --template "CPU Profiler" --output ${filename} --attach ${pid}`;
26
+ }
27
+ else {
28
+ filename = `native-profile-${timeId}.json`;
29
+ command = `samply record --save-only --output ${filename} --pid ${pid}`;
30
+ }
31
+ // Display banner with PID and command
32
+ // Strip ANSI codes for length calculation
33
+ // eslint-disable-next-line no-control-regex
34
+ const stripAnsi = (str) => str.replace(/\u001b\[[0-9;]*m/g, '');
35
+ const boxWidth = Math.max(60, stripAnsi(command).length + 6);
36
+ const title = 'Native Profiling';
37
+ const titlePadding = Math.floor((boxWidth - title.length - 2) / 2);
38
+ const isTTY = process.stdin.isTTY;
39
+ const maxWaitTime = 30; // seconds
40
+ const padLine = (content) => {
41
+ const contentLength = stripAnsi(content).length;
42
+ const padding = Math.max(0, boxWidth - contentLength - 2);
43
+ return (chalk_1.default.blue('│') +
44
+ ' ' +
45
+ content +
46
+ ' '.repeat(padding) +
47
+ ' ' +
48
+ chalk_1.default.blue('│'));
49
+ };
50
+ // Make the command visually distinct and easy to copy
51
+ // Note: Hyperlinks can cause issues with commands (words become separate links)
52
+ // So we just make it visually prominent with colors
53
+ const makeCommandDisplay = (cmd) => {
54
+ return chalk_1.default.cyan.bold(cmd);
55
+ };
56
+ // Contextual message based on TTY
57
+ const continueMessage = isTTY
58
+ ? 'Press Enter or start the profiler to continue'
59
+ : `Build will continue when profiler has started, or after ${maxWaitTime}s`;
60
+ const banner = [
61
+ '',
62
+ chalk_1.default.blue('┌' + '─'.repeat(boxWidth) + '┐'),
63
+ chalk_1.default.blue('│') +
64
+ ' '.repeat(titlePadding) +
65
+ chalk_1.default.blue.bold(title) +
66
+ ' '.repeat(boxWidth - title.length - titlePadding) +
67
+ chalk_1.default.blue('│'),
68
+ chalk_1.default.blue('├' + '─'.repeat(boxWidth) + '┤'),
69
+ padLine(`${chalk_1.default.gray('PID:')} ${chalk_1.default.white.bold(String(pid))}`),
70
+ padLine(''),
71
+ padLine(chalk_1.default.gray('Command:')),
72
+ padLine(makeCommandDisplay(command)),
73
+ padLine(''),
74
+ padLine(chalk_1.default.gray('Run the command above to start profiling.')),
75
+ padLine(chalk_1.default.gray(continueMessage)),
76
+ chalk_1.default.blue('└' + '─'.repeat(boxWidth) + '┘'),
77
+ '',
78
+ ].join('\n');
79
+ // eslint-disable-next-line no-console
80
+ console.log(banner);
81
+ // In both interactive and non-interactive mode, detect when profiler is running
82
+ // In interactive mode, also allow user to press Enter to continue
83
+ if (!process.stdin.isTTY) {
84
+ return this.waitForProfiler(profilerType, pid);
85
+ }
86
+ // Interactive mode: wait for either user to press Enter OR profiler to be detected
87
+ return new Promise((resolve) => {
88
+ let resolved = false;
89
+ const doResolve = () => {
90
+ if (resolved)
91
+ return;
92
+ resolved = true;
93
+ logger_1.default.info({
94
+ origin: '@atlaspack/profiler',
95
+ message: 'Native profiling setup complete',
96
+ });
97
+ resolve();
98
+ };
99
+ const rl = readline_1.default.createInterface({
100
+ input: process.stdin,
101
+ output: process.stdout,
102
+ });
103
+ // User presses Enter
104
+ rl.on('line', () => {
105
+ rl.close();
106
+ doResolve();
107
+ });
108
+ // Also poll for profiler in the background
109
+ this.pollForProfiler(profilerType, pid, doResolve);
110
+ });
111
+ }
112
+ waitForProfiler(profilerType, pid) {
113
+ logger_1.default.info({
114
+ origin: '@atlaspack/profiler',
115
+ message: 'Non-interactive mode: waiting for profiler to attach...',
116
+ });
117
+ return new Promise((resolve) => {
118
+ this.pollForProfiler(profilerType, pid, () => {
119
+ logger_1.default.info({
120
+ origin: '@atlaspack/profiler',
121
+ message: 'Native profiling setup complete',
122
+ });
123
+ resolve();
124
+ });
125
+ });
126
+ }
127
+ async pollForProfiler(profilerType, pid, onDetected) {
128
+ const maxAttempts = 60; // 60 attempts * 500ms = 30 seconds max
129
+ const pollInterval = 500; // 500ms between checks
130
+ for (let attempt = 0; attempt < maxAttempts; attempt++) {
131
+ const isRunning = await this.checkProfilerRunning(profilerType, pid);
132
+ if (isRunning) {
133
+ // Instruments takes longer to start up (~5s), samply needs ~1s
134
+ const waitTime = profilerType === 'instruments' ? 5000 : 1000;
135
+ logger_1.default.info({
136
+ origin: '@atlaspack/profiler',
137
+ message: `Profiler detected, waiting ${waitTime}ms before continuing...`,
138
+ });
139
+ await new Promise((resolve) => setTimeout(resolve, waitTime));
140
+ onDetected();
141
+ return;
142
+ }
143
+ await new Promise((resolve) => setTimeout(resolve, pollInterval));
144
+ }
145
+ // If we couldn't detect the profiler after 30 seconds, log a warning and continue anyway
146
+ logger_1.default.warn({
147
+ origin: '@atlaspack/profiler',
148
+ message: 'Could not detect profiler after 30 seconds, continuing anyway...',
149
+ });
150
+ onDetected();
151
+ }
152
+ async checkProfilerRunning(profilerType, pid) {
153
+ try {
154
+ // Get all processes and filter in JavaScript
155
+ const { stdout } = await execAsync('ps aux');
156
+ const lines = stdout.split('\n').filter((line) => line.trim().length > 0);
157
+ // Use word boundaries to match the PID as a complete number
158
+ const pidRegex = new RegExp(`\\b${pid}\\b`);
159
+ // Determine the profiler process name to look for
160
+ const profilerName = profilerType === 'instruments' ? 'xctrace' : 'samply';
161
+ for (const line of lines) {
162
+ const lowerLine = line.toLowerCase();
163
+ // Skip lines that are part of our own process checking (avoid false positives)
164
+ // Skip lines containing "ps aux" or "grep" to avoid matching our own commands
165
+ if (lowerLine.includes('ps aux') || lowerLine.includes(' grep ')) {
166
+ continue;
167
+ }
168
+ // Skip our own process (the Atlaspack process itself)
169
+ // The PID column is the second field in ps aux output
170
+ const fields = line.trim().split(/\s+/);
171
+ if (fields.length >= 2 && fields[1] === String(pid)) {
172
+ continue;
173
+ }
174
+ // Check if this line contains the profiler name as a command
175
+ const profilerRegex = new RegExp(`\\b${profilerName}\\b`);
176
+ if (!profilerRegex.test(lowerLine)) {
177
+ continue;
178
+ }
179
+ // Now check if our PID appears in the command arguments (not in the PID column)
180
+ // The PID should appear after the profiler command, typically as --pid <pid> or --attach <pid>
181
+ // We need to check the command portion, which starts around column 11 in ps aux
182
+ // For safety, check if PID appears after the profiler name in the line
183
+ const profilerIndex = lowerLine.indexOf(profilerName);
184
+ if (profilerIndex === -1) {
185
+ continue;
186
+ }
187
+ // Check if PID appears in the command portion (after the profiler name)
188
+ const commandPortion = line.substring(profilerIndex);
189
+ if (pidRegex.test(commandPortion)) {
190
+ return true;
191
+ }
192
+ }
193
+ return false;
194
+ }
195
+ catch (error) {
196
+ // If the command fails, log and return false
197
+ logger_1.default.warn({
198
+ origin: '@atlaspack/profiler',
199
+ message: `Error checking profiler status: ${error.message}`,
200
+ });
201
+ return false;
202
+ }
203
+ }
204
+ }
205
+ exports.default = NativeProfiler;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const assert_1 = __importDefault(require("assert"));
7
+ const diagnostic_1 = __importDefault(require("@atlaspack/diagnostic"));
8
+ class SamplingProfiler {
9
+ startProfiling() {
10
+ let inspector;
11
+ try {
12
+ inspector = require('inspector');
13
+ }
14
+ catch (err) {
15
+ throw new diagnostic_1.default({
16
+ diagnostic: {
17
+ message: `The inspector module isn't available`,
18
+ origin: '@atlaspack/workers',
19
+ hints: ['Disable build profiling'],
20
+ },
21
+ });
22
+ }
23
+ this.session = new inspector.Session();
24
+ this.session.connect();
25
+ return Promise.all([
26
+ this.sendCommand('Profiler.setSamplingInterval', {
27
+ interval: 100,
28
+ }),
29
+ this.sendCommand('Profiler.enable'),
30
+ this.sendCommand('Profiler.start'),
31
+ ]);
32
+ }
33
+ sendCommand(method, params) {
34
+ (0, assert_1.default)(this.session != null);
35
+ return new Promise((resolve, reject) => {
36
+ this.session.post(method, params, (err, p) => {
37
+ if (err == null) {
38
+ resolve(p);
39
+ }
40
+ else {
41
+ reject(err);
42
+ }
43
+ });
44
+ });
45
+ }
46
+ destroy() {
47
+ if (this.session != null) {
48
+ this.session.disconnect();
49
+ }
50
+ }
51
+ async stopProfiling() {
52
+ let res = await this.sendCommand('Profiler.stop');
53
+ this.destroy();
54
+ return res.profile;
55
+ }
56
+ }
57
+ exports.default = SamplingProfiler;