You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

performance-nodejs

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

performance-nodejs

get nodejs performance, eg: heap statistics, event loop delay

0.0.5
Source
npmnpm
Version published
Weekly downloads
29
31.82%
Maintainers
1
Weekly downloads
 
Created
Source

performance-nodejs

Build Status Coverage Status npm Github Releases

Get nodejs performance, eg: heap statistics, event loop delay

Installation

$ npm install performance-nodejs

Description

The performance() function get node.js performance (include event loop and heap statistics).

const timer = performance(fn, interval);
  • fn: The callback function to execute.

  • interval: Check interval, defaulted to 100ms.

Returns: A reference to the timer. Useful for clearing the timer.

performance(data => {
	// {"lag":5,"heap":{"total_heap_size":61160224,"total_heap_size_executable":7340032,"total_physical_size":61160224,"total_available_size":1477373760,"used_heap_size":32845320,"heap_size_limit":1535115264}}
	console.info(JSON.stringify(data));
});

License

MIT

Keywords

performance

FAQs

Package last updated on 04 May 2016

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.