File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/main/java/com/arpnetworking/clusteraggregator/models Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -303,7 +303,13 @@ public static Builder fromStatisticSetRecord(final Messages.StatisticSetRecord r
303
303
if (statistic instanceof HistogramStatistic ) {
304
304
final Messages .SparseHistogramSupportingData supportingData = deserialzeSupportingData (statisticRecord );
305
305
306
- final HistogramStatistic .Histogram histogram = new HistogramStatistic .Histogram ();
306
+ final HistogramStatistic .Histogram histogram ;
307
+ if (supportingData .getPrecision () == 0 ) {
308
+ histogram = new HistogramStatistic .Histogram ();
309
+ } else {
310
+ // Subtract 1 from the precision to get the actual precision since 0 means default precision
311
+ histogram = new HistogramStatistic .Histogram (supportingData .getPrecision () - 1 );
312
+ }
307
313
for (final Messages .SparseHistogramEntry entry : supportingData .getEntriesList ()) {
308
314
final double bucket = entry .getBucket ();
309
315
final long count = entry .getCount ();
You can’t perform that action at this time.
0 commit comments