From 711c7bb1a90ef2be5d86639ca61f44bd66be5b49 Mon Sep 17 00:00:00 2001 From: Jonas Finnemann Jensen Date: Thu, 19 May 2016 09:52:30 -0700 Subject: [PATCH 1/2] Adding a api.all..count and measure --- src/utils.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils.js b/src/utils.js index f7c6447..f325a78 100644 --- a/src/utils.js +++ b/src/utils.js @@ -38,6 +38,8 @@ export function expressMiddleware (monitor, name) { monitor.measure(k, d[0] * 1000 + d[1] / 1000000); monitor.count(k); } + monitor.measure(['all', stat], d[0] * 1000 + d[1] / 1000000); + monitor.count(['all', stat]); } catch (e) { debug('Error while compiling response times: %s, %j', err, err, err.stack); } From 41422559d99d7c86a41854f8c55eed4bce745095 Mon Sep 17 00:00:00 2001 From: Jonas Finnemann Jensen Date: Thu, 26 May 2016 10:59:10 -0700 Subject: [PATCH 2/2] stat -> success --- src/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.js b/src/utils.js index f325a78..f976e3d 100644 --- a/src/utils.js +++ b/src/utils.js @@ -38,8 +38,8 @@ export function expressMiddleware (monitor, name) { monitor.measure(k, d[0] * 1000 + d[1] / 1000000); monitor.count(k); } - monitor.measure(['all', stat], d[0] * 1000 + d[1] / 1000000); - monitor.count(['all', stat]); + monitor.measure(['all', success], d[0] * 1000 + d[1] / 1000000); + monitor.count(['all', success]); } catch (e) { debug('Error while compiling response times: %s, %j', err, err, err.stack); }