You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RandomEtc edited this page Mar 6, 2012
·
2 revisions
Measuring the rate of requests and responses (by statusCode) in Express.js
// assuming you have a metrics instance in scopefunctionmarkReqRes(req,res,next){metrics.mark('requests');res.once('finish',function(){metrics.mark('responses.'+res.statusCode);})next();}// and then in your configure functionapp.use(markReqRes);