New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nps-reader

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nps-reader

A Node.JS library for parsing NPS snapshots generated by Java VisualVM

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

nps-reader

This small library with no external dependecies is intended to help decoding NPS snapshots used by Java VisualVM tool. Currently it only supports decoding CPU profiles.

Based on VisualVM source code.

Currently there's pretty much the only method in this library: NPS.readFromBuffer(buffer). It accepts a buffer as a single argument and returns the corresponding data structure.

Usage:

const fs = require('fs');
const util = require('util');
const NPS = require('nps-reader');

const samples = fs.readFileSync('sampler-snapshot_18.nps');

const data = NPS.readFromBuffer(samples);

console.log(util.inspect(data, { colors: true, depth: 5 }));

The main purpose of this library was to visualise snapshots generated by Sampler mod for Minecraft (without the need to use VisualVM itself).

TBD

  • Parsing other types of snapshots
  • Saving snapshots
  • Adding async methods

Keywords

FAQs

Package last updated on 01 Apr 2020

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