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

Fix issue with historgram statistic set being converted by duration #6

Merged

Conversation

williedoran
Copy link

removed covert by duration and added test for historgram min,max and sum reporting in statistic set

@@ -242,7 +242,7 @@ private void processHistogram(final String metricName, final Histogram histogram
stageMetricDatum(true, metricName, value, StandardUnit.None, percentile.getDesc(), metricData);
}

stageMetricDatum(builder.withStatisticSet, metricName, snapshot, StandardUnit.None, "snapshot-summary", metricData);
stageHistorgramMtricStatisticSet(builder.withStatisticSet, metricName, snapshot, StandardUnit.None, "snapshot-summary", metricData);
Copy link
Owner

Choose a reason for hiding this comment

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

Typo in: stageHistorgramMtricStatisticSet

.filter(metricDatum -> metricDatum.getDimensions()
.contains(new Dimension().withName("Type").withValue(dimensionValue)))
.filter(metricDatum -> {
System.out.println(metricDatum.getDimensions());
Copy link
Owner

Choose a reason for hiding this comment

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

Forgot the System.out.println due to debugging?

@azagniotov
Copy link
Owner

Thank you! Left some comments

…ogram to show subsequent reports are correct
@williedoran
Copy link
Author

Addressed the comments and added another test for a sliding window histogram to sanity check that subsequent report methods correctly update the min/max etc

slidingWindowHistogram.update(100);
slidingWindowHistogram.update(5);
slidingWindowHistogram.update(6);
reporterBuilder.withStatisticSet().build().report();
Copy link
Owner

@azagniotov azagniotov Aug 15, 2017

Choose a reason for hiding this comment

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

I am curious: did you intentionally re-build the CloudWatchReporter before reporting the 2nd time? Why not just reporter.report(); without rebuilding - I guess it can be another test case?

@azagniotov
Copy link
Owner

azagniotov commented Aug 15, 2017 via email

@azagniotov azagniotov merged commit 8376908 into azagniotov:master Aug 17, 2017
azagniotov added a commit that referenced this pull request Aug 20, 2017
- Issue #4: Not reporting zero values.
- PR #6: Histogram snapshot values being converted using a duration factor, instead of reporting raw values (https://github.com/williedoran)
- Checking 'isDebugEnabled' when logging debug information
azagniotov added a commit that referenced this pull request Aug 20, 2017
- Issue #4: Not reporting zero values.
- PR #6: Histogram snapshot values being converted using a duration factor, instead of reporting raw values (https://github.com/williedoran)
- Checking 'isDebugEnabled' when logging debug information
azagniotov added a commit that referenced this pull request Aug 20, 2017
- Issue #4: Not reporting zero values.
- PR #6: Histogram snapshot values being converted using a duration factor, instead of reporting raw values (https://github.com/williedoran)
- Checking 'isDebugEnabled' when logging debug information
azagniotov added a commit that referenced this pull request Aug 20, 2017
- Issue #4: Not reporting zero values.
- PR #6: Histogram snapshot values being converted using a duration factor, instead of reporting raw values (https://github.com/williedoran)
- Checking 'isDebugEnabled' when logging debug information
azagniotov added a commit that referenced this pull request Aug 20, 2017
- Issue #4: Not reporting zero values.
- PR #6: Histogram snapshot values being converted using a duration factor, instead of reporting raw values (https://github.com/williedoran)
- Checking 'isDebugEnabled' when logging debug information
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.

2 participants