Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: why 'loop' event is occur by 4 seconds and 6 seconds, not 5 seconds #603

Open
yuecchen opened this issue Jul 22, 2019 · 0 comments

Comments

@yuecchen
Copy link
Contributor

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?

  1. why the duration is not 5 seconds and it is so exactly 4 and 6 seconds?
  2. will the metrics value is for 5 second summary or for 4 and 6 seconds summary as the actual time duration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant