Browse Source

simple page performance logging

fix-133-memory-crash
Dan Janosik 6 years ago
parent
commit
d8e7878d2f
No known key found for this signature in database GPG Key ID: C6F8CE9FFDB2CED2
  1. 3
      app.js

3
app.js

@ -19,6 +19,7 @@ var debug = require("debug");
debug.enable(process.env.DEBUG);
var debugLog = debug("btcexp:app");
var debugPerfLog = debug("btcexp:actionPerformace");
var express = require('express');
var favicon = require('serve-favicon');
@ -533,6 +534,8 @@ app.use(function(req, res, next) {
var time = Date.now() - req.startTime;
var memdiff = process.memoryUsage().heapUsed - req.startMem;
debugPerfLog("Finished action '%s' in %d ms", req.path, time);
if (global.influxdb) {
var points = [];
points.push({

Loading…
Cancel
Save