Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@dnlup/doc
Advanced tools
Get usage and health data about your Node.js process
const Doc = require('@dnlup/doc');
const doc = Doc(); // Use the default sample interval
doc.on('data', data => {
doStuffWithCpuUsage(data.cpu)
doStuffWithMemoryUsage(data.memory)
doStuffWithEventLoopDelay(data.eventLoopDelay)
})
Create a new Doc instance with the given options.
options
: Object
. Optional. Configuration objectoptions.sampleInterval
: Number
. Optional. Sample interval (ms), each sampleInterval
ms a data event is emitted. On Node 10 the default value is 500
while on Node >= 12 is 1000
. Under the hood the package uses monitorEventLoopDelay
where available to sample the event loop and this allows to increase the default sample interval on Node >= 12.options.eventLoopOptions
: Object
. Optional. Options to setup monitorEventLoopDelay
Process data event.
Properties:
Name | Description |
---|---|
eventLoopDelay | Event loop delay (ms) |
memory | Object containing memory usage stats |
memory.rss | RSS memory (bytes) |
memory.heapTotal | Total heap Memory (bytes) |
memory.heapUsed | Heap memory used (bytes) |
memory.external | Extarnal memory (bytes) |
cpu | Cpu usage percentage |
raw | Object containing raw values |
raw.cpu | Object containing the raw values returned from process.cpuUsage() |
raw.eventLoopDelay | Raw representation of the event loop delay, on Node 10 it is the delay in nanoseconds, on Node >= 12 is a Histogram instance |
FAQs
Get usage and health data about your Node.js process
The npm package @dnlup/doc receives a total of 280 weekly downloads. As such, @dnlup/doc popularity was classified as not popular.
We found that @dnlup/doc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.