Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
memory-lite
Advanced tools
A simple, bare-bones package for monitoring NodeJS memory usage using the console.
Memory Lite is a simple, bare-bones package for monitoring NodeJS memory usage using the console.
Memory Lite can be installed using the package manager of your choosing. The example command below uses yarn.
$ yarn add memory-monitor
Usage is extremely straightforward -- 1) import the package, and 2) initialized the monitor. Memory Lite can be used without passing any arguments, however all arguments and their defaults are shown below:
// <app-entry-point>.ts
import memoryMonitor from 'memory-lite';
memoryMonitor({
interval: 10000,
rss: true,
heapTotal: true,
heapUsed: false,
external: false,
arrayBuffers: false
});
With this default setup, the following will be output to the console at 10 second intervals (numbers shown are arbitrary):
rss: 21.9 MiB | heapTotal: 4.6 MiB
If all boolean arguments set to true
, the following will be output to the console:
rss: 22.9 MiB | heapTotal: 4.9 MiB | heapUsed: 4.3 MiB | external: 294.7 KiB | arrayBuffers: 43.7 KiB
Name | Default | Description |
---|---|---|
interval | 10000 (ms) | The sampling rate expressed as time between sample (and subsequent logging) events. |
rss | true | Determines whether or not rss should be included in the output. |
heapTotal | true | Determines whether or not heapTotal should be included in the output. |
heapUsed | false | Determines whether or not heapUsed should be included in the output. |
external | false | Determines whether or not external should be included in the output. |
arrayBuffers | false | Determines whether or not arrayBuffers should be included in the output. |
Contribution is welcome, although there is probably little more to be done. Some options include:
These would constitute fairly large changes and may even warrant packages of their own, however they are valid ideas for improving the utility of this package.
FAQs
A simple, bare-bones package for monitoring NodeJS memory usage using the console.
The npm package memory-lite receives a total of 0 weekly downloads. As such, memory-lite popularity was classified as not popular.
We found that memory-lite demonstrated a not healthy version release cadence and project activity because the last version was released 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.