
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
performance-nodejs
Advanced tools
Get nodejs performance, such as: heap statistics, event loop delay
$ npm i performance-nodejs
View the ./examples directory for working examples.
The performance()
function get node.js performance (include event loop, heap statistics and heap space statistics).
const timer = performance(fn, interval);
fn: The callback function to execute.
interval: Check interval, defaulted to 100ms.
unit: Set the heap format unit, eg: 'B', 'MB', 'GB', '0.0MB' defaulted to 'B'. 0.00MB
means set 2 precision and 'MB' unit.
Returns: A reference to the timer. Useful for clearing the timer.
cpuUsage
is new in node.js v6.x.
malloced_memory
, peak_malloced_memory
and does_zap_garbage
is new in node.js v7.x
// node.js performance
{
"lag": 0,
"heap": {
"total_heap_size": 7,
"total_heap_size_executable": 5,
"total_physical_size": 7,
"total_available_size": 1421,
"used_heap_size": 3,
"heap_size_limit": 1432,
"malloced_memory": 0,
"peak_malloced_memory": 1,
"does_zap_garbage": 0
},
"heapSpace": {
"new_space": {
"size": 2,
"used_size": 1,
"available_size": 0,
"physical_size": 2
},
"old_space": {
"size": 2,
"used_size": 1,
"available_size": 0,
"physical_size": 2
},
"code_space": {
"size": 2,
"used_size": 1,
"available_size": 0,
"physical_size": 2
},
"map_space": {
"size": 1,
"used_size": 0,
"available_size": 0,
"physical_size": 1
},
"large_object_space": {
"size": 0,
"used_size": 0,
"available_size": 1421,
"physical_size": 0
}
},
"cpuUsage": {
"user": 1966,
"system": 185,
"usedPercent": 1,
"total": 474737
}
}
performance(data => {
console.info(JSON.stringify(data));
}, 'MB', 100);
MIT
FAQs
get nodejs performance, such as: heap statistics, event loop delay
The npm package performance-nodejs receives a total of 26 weekly downloads. As such, performance-nodejs popularity was classified as not popular.
We found that performance-nodejs 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.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.