Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

v8-profiler-next

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

v8-profiler-next - npm Package Compare versions

Comparing version 1.4.3 to 1.5.0

13

dispatch.js

@@ -221,2 +221,11 @@ 'use strict';

setGenerateType: function (type) {
const types = [0, 1];
if (types.indexOf(type) > 0) {
binding.cpu.setGenerateType(type);
} else {
console.error(`type should in [${types.join(', ')}], got ${type}.`);
}
},
startProfiling: function (name, recsamples) {

@@ -232,3 +241,3 @@ if (activeProfiles.length == 0 && typeof process._startProfilerIdleNotifier == "function")

recsamples = recsamples === undefined ? true : Boolean(recsamples);
name = '' + name;
name = name && '' + name || '';

@@ -300,2 +309,2 @@ if (activeProfiles.indexOf(name) < 0)

module.exports = profiler;
process.profiler = profiler;
process.profiler = profiler;

3

index.d.ts

@@ -15,2 +15,3 @@ import { Stream } from "stream";

*/
export function setGenerateType(type: 0 | 1): void;
export function stopProfiling(name?: string): CpuProfile;

@@ -74,3 +75,3 @@ export function deleteAllProfiles(): void;

export class ExportStream extends Stream.Transform {}
export class ExportStream extends Stream.Transform { }

@@ -77,0 +78,0 @@ export class Snapshot extends Profile {

{
"name": "v8-profiler-next",
"version": "1.4.3",
"version": "1.5.0",
"description": "node bindings for the v8 profiler",

@@ -5,0 +5,0 @@ "main": "dispatch.js",

@@ -24,4 +24,10 @@ # v8-profiler-next

'use strict';
const fs = require('fs');
const v8Profiler = require('v8-profiler-next');
const title = 'good-name';
// set generateType 1 to generate new format for cpuprofile
// to be compatible with cpuprofile parsing in vscode.
v8Profiler.setGenerateType(1);
// ex. 5 mins cpu profile

@@ -28,0 +34,0 @@ v8Profiler.startProfiling(title, true);

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc