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

node bindings for the v8 profiler

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17K
increased by45.48%
Maintainers
1
Weekly downloads
 
Created
Source

v8-profiler-next

npm version Package Quality npm license

I. Quick Start

take cpu profile

'use strict';
const v8Profiler = require('v8-profiler-next');
const title = '';
// ex. 5 mins cpu profile
v8Profiler.startProfiling(title, true);
setTimeout(() => {
	const profiler = v8Profiler.stopProfiling(title);
	profiler.delete();
	console.log(profiler);
}, 5 * 60 * 1000);

take heapsnapshot

'use strict';
const v8Profiler = require('v8-profiler-next');
const snapshot = v8Profiler.takeSnapshot();
// 1. not as stream
snapshot.export(function (error, result) {
	if (error){
		console.error(error);
		return;
	}
	console.log(result);
	snapshot.delete();
});
// 2. as stream
const transform = snapshot.export();
transform.pipe(process.stdout);
transform.on('finish', snapshot.delete.bind(snapshot));

II. License

MIT License

Copyright (c) 2017 team of v8-profiler, hyj1991

Keywords

FAQs

Package last updated on 27 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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