Skip to content

update `test-performance` use setImmediate instead of setTimeout

The following pr reduces the time assertions take by replacing setTimeout by setImmediate that should make test run faster.

Also included some code refactor, make improve code readability.

Run

time ./node ./test/sequential/test-performance

Should see time reducing from real ~0m2.106s to real ~0m0.111s

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading