Comparing version 1.2.5 to 1.2.6
@@ -24,3 +24,3 @@ #!/usr/bin/env node | ||
.command('FilePath','Enter path',{ | ||
filepath:{ | ||
outputdir:{ | ||
describe : 'eg /tmp/', | ||
@@ -40,3 +40,3 @@ alias: 'f' | ||
"nIntervals": at.du, | ||
"defaultpath": at.filepath | ||
"defaultpath": at.outputdir | ||
} | ||
@@ -43,0 +43,0 @@ |
@@ -5,3 +5,3 @@ #!/usr/bin/env node | ||
var libpath = require('path'); | ||
var filePath ='/tmp/config.json'; | ||
var configfilePath ='/tmp/config.json'; | ||
var heapdump = require('heapdump'); | ||
@@ -12,7 +12,7 @@ var nodereport = require('node-report'); | ||
fs.watchFile(filePath, function(event, filename) { | ||
fs.watchFile(configfilePath, function(event, filename) { | ||
console.log('File Changed !!!'); | ||
if(filename){ | ||
try{ | ||
jsonfile.readFile(filePath, function(err, obj) { | ||
jsonfile.readFile(configfilePath, function(err, obj) { | ||
if (err){ | ||
@@ -25,5 +25,5 @@ console.log('err in reading file'); | ||
if(obj.type == 'heap'){ | ||
for (var i = 0; i < obj.nTimes ; i++){ | ||
setTimeout(function() {generateHeapDumpAndStats();}, obj.nIntervals);} | ||
setTimeout(function() {generateHeapDumpAndStats();}, obj.nIntervals); | ||
} | ||
@@ -52,3 +52,3 @@ function generateHeapDumpAndStats(){ | ||
else{ | ||
console.log('filename not provided') | ||
console.log('filename not provided'); | ||
} | ||
@@ -66,2 +66,3 @@ }); | ||
else if(req.parsedUrl.pathname == '/getlist'){ | ||
console.log('Reading list'); | ||
fs.readdir(config.dir, function (err, filenames) { | ||
@@ -68,0 +69,0 @@ if (err) { |
{ | ||
"name": "heapware", | ||
"version": "1.2.5", | ||
"description": "trigger and export heap-dumps and nodereport ", | ||
"version": "1.2.6", | ||
"description": "trigger and export heap-dumps and nodereport ", | ||
"main": "my-middleware.js", | ||
@@ -6,0 +6,0 @@ "bin": { |
Sorry, the diff of this file is not supported yet
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
121
32964