GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — node/test/sequential/test-heapdump-flag.js at main · ide/node Expand file tree/ Copy pathtest-heapdump-flag.jsMore file actions 41 lines (31 loc) · 1.19 KB / Copy pathtest-heapdump-flag.jsFile metadata and controls41 lines (31 loc) · 1.19 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 'use strict'; const common = require('../common'); if (common.isWindows) common.skip('test not supported on Windows'); const assert = require('assert'); if (process.argv[2] === 'child') { const fs = require('fs'); assert.strictEqual(process.listenerCount('SIGUSR2'), 1); process.kill(process.pid, 'SIGUSR2'); process.kill(process.pid, 'SIGUSR2'); // Asynchronously wait for the snapshot. Use an async loop to be a bit more // robust in case platform or machine differences throw off the timing. (function validate() { const files = fs.readdirSync(process.cwd()); if (files.length === 0) return setImmediate(validate); assert.strictEqual(files.length, 2); for (let i = 0; i < files.length; i++) { assert.match(files[i], /^Heap\..+\.heapsnapshot$/); JSON.parse(fs.readFileSync(files[i])); } })(); } else { const { spawnSync } = require('child_process'); const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); const args = ['--heapsnapshot-signal', 'SIGUSR2', __filename, 'child']; const child = spawnSync(process.execPath, args, { cwd: tmpdir.path }); assert.strictEqual(child.status, 0); assert.strictEqual(child.signal, null); } |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |