@@ -8,6 +8,7 @@ This directory contains modules used to test the Node.js implementation.
8
8
* [ Benchmark module] ( #benchmark-module )
9
9
* [ Common module API] ( #common-module-api )
10
10
* [ Countdown module] ( #countdown-module )
11
+ * [ CPU Profiler module] ( #cpu-profiler-module )
11
12
* [ DNS module] ( #dns-module )
12
13
* [ Duplex pair helper] ( #duplex-pair-helper )
13
14
* [ Environment variables] ( #environment-variables )
@@ -431,6 +432,47 @@ Decrements the `Countdown` counter.
431
432
Specifies the remaining number of times ` Countdown.prototype.dec() ` must be
432
433
called before the callback is invoked.
433
434
435
+ ## CPU Profiler module
436
+
437
+ The ` cpu-prof ` module provides utilities related to CPU profiling tests.
438
+
439
+ ### env
440
+
441
+ * Default: { ...process.env, FIB, NODE_DEBUG_NATIVE: 'INSPECTOR_PROFILER' }
442
+
443
+ Environment variables used in profiled processes. FIB will be set to ` 40 ` on
444
+ Windows and ` 30 ` elsewhere.
445
+
446
+ ### getCpuProfiles(dir)
447
+
448
+ * ` dir ` {string} The directory containing the CPU profile files.
449
+ * return [ < ; string>]
450
+
451
+ Returns an array of all ` .cpuprofile ` files found in ` dir ` .
452
+
453
+ ### getFrames(output, file, suffix)
454
+
455
+ * ` output ` Unused.
456
+ * ` file ` {string} Path to a ` .cpuprofile ` file.
457
+ * ` suffix ` {string} Suffix of the URL of call frames to retrieve.
458
+ * returns { frames: [ < ; Object>] , nodes: [ < ; Object>] }
459
+
460
+ Returns an object containing an array of the relevant call frames and an array
461
+ of all the profile nodes.
462
+
463
+ ### kCpuProfInterval
464
+
465
+ Sampling interval in microseconds.
466
+
467
+ ### verifyFrames(output, file, suffix)
468
+
469
+ * ` output ` {string}
470
+ * ` file ` {string}
471
+ * ` suffix ` {string}
472
+
473
+ Throws an ` AssertionError ` if there are no call frames with the expected
474
+ ` suffix ` in the profiling data contained in ` file ` .
475
+
434
476
## DNS Module
435
477
436
478
The ` DNS ` module provides utilities related to the ` dns ` built-in module.
0 commit comments