appmetrics
appmetrics copied to clipboard
Question: why 'loop' event is occur by 4 seconds and 6 seconds, not 5 seconds
trafficstars
I add the following lines in the top of application:
var appmetrics=require('appmetrics');
var monitor = appmetrics.monitor();
monitor.on('loop', function(data){console.info('timestamp:',new Date());});
And I will got the following logs:
timestamp: 2019-07-22T02:22:07.394Z
timestamp: 2019-07-22T02:22:11.394Z
timestamp: 2019-07-22T02:22:17.394Z
timestamp: 2019-07-22T02:22:21.395Z
timestamp: 2019-07-22T02:22:27.396Z
timestamp: 2019-07-22T02:22:31.396Z
the duration is 4 second then 6 second, but the README says it should be a 5 seconds summary data. Could you please help explain?
- why the duration is not 5 seconds and it is so exactly 4 and 6 seconds?
- will the metrics value is for 5 second summary or for 4 and 6 seconds summary as the actual time duration.