Socket
Socket
Sign inDemoInstall

v8-heap-space-statistics

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    v8-heap-space-statistics

Heap space usage statistics for Node.js version 4


Version published
Weekly downloads
7
increased by133.33%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

getHeapSpaceStatistics

Build Status

Heap space usage statistics for Node.js version 4.

Like require('v8').getHeapSpaceStatistics() in newer versions of Node - it returns statistics about the V8 heap spaces, i.e. the segments which make up the V8 heap.

The value returned is an array of objects containing the following properties:

  • space_name: string
  • space_size: number
  • space_used_size: number
  • space_available_size: number
  • physical_space_size: number

More info: https://nodejs.org/api/v8.html#v8_v8_getheapspacestatistics

Install

npm install v8-heap-space-statistics

Sample usage

var getHeapSpaceStatistics = require('v8-heap-space-statistics');
console.log(getHeapSpaceStatistics());

Sample output

[
  {
    space_name: 'new_space',
    space_size: 4127744,
    space_used_size: 741496,
    space_available_size: 1322376,
    physical_space_size: 4127744
  },
  {
    space_name: 'old_space',
    space_size: 3095808,
    space_used_size: 2208792,
    space_available_size: 7352,
    physical_space_size: 3095808
  },
  {
    space_name: 'code_space',
    space_size: 1019904,
    space_used_size: 848864,
    space_available_size: 0,
    physical_space_size: 1019904
  },
  {
    space_name: 'map_space',
    space_size: 1031936,
    space_used_size: 224752,
    space_available_size: 0,
    physical_space_size: 1031936
  },
  {
    space_name: 'large_object_space',
    space_size: 0,
    space_used_size: 0,
    space_available_size: 1492107008,
    physical_space_size: 0
  } 
]

Keywords

FAQs

Last updated on 21 Nov 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc