diff --git a/app.js b/app.js index 1c773ce..8afae59 100755 --- a/app.js +++ b/app.js @@ -79,13 +79,22 @@ function refreshExchangeRate() { } } +var firstCall = true; function trackMemoryUsage() { var mbUsed = process.memoryUsage().heapUsed / 1024 / 1024; mbUsed = Math.round(mbUsed * 100) / 100; var stream = fs.createWriteStream("memoryUsage.csv", {flags:'a'}); + + if (firstCall) { + stream.write("App starting up."); + } + stream.write(new Date().toISOString() + "," + mbUsed + "\n"); + stream.end(); + + firstCall = false; }