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

Negative preaggregated metrics fix #778

Merged
merged 1 commit into from
Jun 15, 2021
Merged

Conversation

hectorhdzg
Copy link
Member

Last interval execution time need to be part of specific pre aggregated counter instead of global one to avoid miscalculations generating negative numbers

Fixes #776

@hectorhdzg hectorhdzg requested a review from ramthi June 15, 2021 23:39
@@ -172,8 +170,8 @@ class AutoCollectPreAggregatedMetrics {
currentCounter.time = +new Date;
var intervalRequests = (currentCounter.totalCount - currentCounter.lastTotalCount) || 0;
var elapsedMs = currentCounter.time - currentCounter.lastTime;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method and countDependency/countRequet methods have 95% similar code and perhaps could be refactored to remove duplication, in future.

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

Successfully merging this pull request may close these issues.

After upgrading to v2, negative server response times are recorded
3 participants