mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
Scan fix: cs #17, implicit narrowing
This commit is contained in:
parent
f8eecd541e
commit
11e4c8cc49
@ -309,6 +309,7 @@ public class AggregateSummaryStatistics implements StatisticalSummary,
|
|||||||
* @param statistics collection of SummaryStatistics to aggregate
|
* @param statistics collection of SummaryStatistics to aggregate
|
||||||
* @return summary statistics for the combined dataset
|
* @return summary statistics for the combined dataset
|
||||||
*/
|
*/
|
||||||
|
// TODO - we need a unit test around this one.
|
||||||
public static StatisticalSummaryValues aggregate(Collection<? extends StatisticalSummary> statistics) {
|
public static StatisticalSummaryValues aggregate(Collection<? extends StatisticalSummary> statistics) {
|
||||||
if (statistics == null) {
|
if (statistics == null) {
|
||||||
return null;
|
return null;
|
||||||
@ -335,7 +336,7 @@ public class AggregateSummaryStatistics implements StatisticalSummary,
|
|||||||
}
|
}
|
||||||
sum += current.getSum();
|
sum += current.getSum();
|
||||||
final double oldN = n;
|
final double oldN = n;
|
||||||
final double curN = current.getN();
|
final long curN = current.getN();
|
||||||
n += curN;
|
n += curN;
|
||||||
final double meanDiff = current.getMean() - mean;
|
final double meanDiff = current.getMean() - mean;
|
||||||
mean = sum / n;
|
mean = sum / n;
|
||||||
|
Loading…
Reference in New Issue
Block a user