Comparing version 0.0.5 to 0.0.6
@@ -55,5 +55,6 @@ #! /usr/bin/env node | ||
} | ||
console.log('Injecting interface into process', process.argv[2]) | ||
console.log('Injecting interface into process', process.argv[3]) | ||
try { | ||
cmd('cat commands | { while read l ; do sleep 1; echo $l; done } | NTOP=$(npm -g root)"/ntop" node inspect -p ' + process.argv[3], (resp) => { | ||
cmd('cat commands | { while read l ; do sleep 2; echo $l; done } | NTOP=$(npm -g root)"/ntop" node inspect -p ' + process.argv[3], (resp) => { | ||
console.log(resp) | ||
if (resp.includes('ntop-enabled')) console.log(`The process is now ready for profiling! Run "ntop ${process.argv[3]}"`) | ||
@@ -60,0 +61,0 @@ }) |
{ | ||
"name": "ntop", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Node CLI runtime profiler - easily debug unexpected high CPU usage", | ||
@@ -5,0 +5,0 @@ "main": "ntop.js", |
@@ -7,4 +7,11 @@ "top" command for Node apps | ||
Usage | ||
Usage - with no code changes required(Linux only) | ||
```bash | ||
npm i -g ntop | ||
ntop inject 12345 // where 12345 is the process id | ||
ntop 12345 | ||
``` | ||
Usage with includes in a project | ||
```bash | ||
npm i ntop | ||
@@ -11,0 +18,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17581
354
113