v8-profiler-next
Advanced tools
Comparing version 0.2.0 to 1.0.0
@@ -280,10 +280,13 @@ 'use strict'; | ||
startSamplingHeapProfiling: function (interval, depth) { | ||
if (arguments.length === 2) { | ||
if (process.versions.modules < 48) | ||
throw new Error('Sampling heap profiler needs node version >= node-v6.0.0!'); | ||
if (arguments.length === 2) | ||
binding.samplingHeap.startSamplingHeapProfiling(interval, depth); | ||
} else { | ||
else | ||
binding.samplingHeap.startSamplingHeapProfiling(); | ||
} | ||
}, | ||
stopSamplingHeapProfiling: function () { | ||
if (process.versions.modules < 48) | ||
throw new Error('Sampling heap profiler needs node version >= node-v6.0.0 !'); | ||
let profile = binding.samplingHeap.stopSamplingHeapProfiling(); | ||
@@ -290,0 +293,0 @@ profile.__proto__ = SamplingHeapProfile.prototype; |
{ | ||
"name": "v8-profiler-next", | ||
"version": "0.2.0", | ||
"version": "1.0.0", | ||
"description": "node bindings for the v8 profiler", | ||
@@ -31,4 +31,4 @@ "main": "dispatch.js", | ||
"dependencies": { | ||
"nan": "^2.8.0" | ||
"nan": "^2.10.0" | ||
} | ||
} | ||
} |
@@ -10,3 +10,3 @@ # v8-profiler-next | ||
Need node v6 + | ||
Support Node v4.x ~ v10.x | ||
@@ -57,3 +57,3 @@ ### take cpu profile | ||
setInterval(() => { | ||
arraytest.push(new Array(1e2).fill('*').join()); | ||
arraytest.push(new Array(1e2).fill('*').join()); | ||
}, 20); | ||
@@ -66,3 +66,3 @@ // start 1min sampling profile | ||
// upload shf.heapprofile into chrome dev tools -> Memory -> ALLOCATION PRODILES | ||
require('fs').writeFileSync('./shf.heapprofile', JSON.stringify(profile)); | ||
require('fs').writeFileSync('./shf.heapprofile', JSON.stringify(profile)); | ||
console.log(profile); | ||
@@ -76,2 +76,2 @@ }, 60 * 1000); | ||
Copyright (c) 2017 team of [v8-profiler](github.com/node-inspector/v8-profiler), hyj1991 | ||
Copyright (c) 2018 team of [v8-profiler](github.com/node-inspector/v8-profiler), hyj1991 |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
231
1
48275
Updatednan@^2.10.0