mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
PR-URL: https://github.com/nodejs/node/pull/59807 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
13 lines
298 B
JavaScript
13 lines
298 B
JavaScript
'use strict';
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const v8 = require('v8');
|
|
|
|
const handle = v8.startCpuProfile();
|
|
const profile = handle.stop();
|
|
assert.ok(typeof profile === 'string');
|
|
assert.ok(profile.length > 0);
|
|
// Call stop() again
|
|
assert.ok(handle.stop() === undefined);
|