node/test/parallel/test-v8-collect-gc-profile.js
theanarkh 733ef4e0ff
v8: support gc profile
PR-URL: https://github.com/nodejs/node/pull/46255
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2023-01-25 12:02:09 +00:00

13 lines
197 B
JavaScript

// Flags: --expose-gc
'use strict';
require('../common');
const { testGCProfiler } = require('../common/v8');
testGCProfiler();
for (let i = 0; i < 100; i++) {
new Array(100);
}
global?.gc();