Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
To install just do:
$ npm install mhsp
This API will extract "snapshot"
, "nodes"
, "edges"
and "strings"
from
very large snapshots in a way that allows you to continue working with them. It
doesn't however show "trace_function_infos"
, "trace_tree"
or "samples"
.
Mainly because I don't need them right now. File an issue or open a PR if you'd
like to help.
parseSnapshot(path)
DataAccessor
instanceThis does all the magic. Just give it a path to a snapshot and it'll automatically do everything for you. Here's an example:
'use strict';
const { parseSnapshot } = require('mhsp');
const accessor = parseSnapshot('./my-big.heapsnapshot');
Warning that for large snapshots this can take several minutes.
accessor.snapshot
Object
This is the metadata object that contains various information about the snapshot.
accessor.nodes
Uint32Array
This is a Uint32Array
of all the nodes in the snapshot. Go ahead and access
it by index.
accessor.edges
Uint32Array
This is also a Uint32Array
that can be accessed by index.
accessor.getString(index)
String
Returning strings from the "strings"
field isn't as straight forward. Some
fun index tracking is done under the hood so the entire "strings"
section can
live in one big Buffer
.
accessor.writeToFile(path)
Number
of bytes written to diskSince generating the accessor takes so long you can go ahead and write the
entire thing to disk in the form of a binary blob. Can then use importBin()
to read it back in later. Is much much faster.
importBin(path)
DataAccessor
instanceRead in files that have already been processed and written to disk as binary blobs. On my i7 the first time I process a 2GB snapshot can take over 1.5 minutes. But reading it back in this way only takes a few seconds. Highly recommended.
FAQs
parser for massive heap snapshots
The npm package mhsp receives a total of 8 weekly downloads. As such, mhsp popularity was classified as not popular.
We found that mhsp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.