Commit 3d74a2fb authored by Matteo Melli's avatar Matteo Melli
Browse files

Merge branch 'fix-empty-groups' into 'master'

Groups should return a value event if no process is active in the group

See merge request ongresinc/pgio!2
parents d6ff6299 9f30c3fd
......@@ -61,11 +61,12 @@ public class ProcessGroupStat {
private Optional<UnsignedLong> reduceFromStats(
Function<ProcessStat, Optional<UnsignedLong>> valueSupplier) {
return Optional.of(
(result, stat) -> valueSupplier.apply(stat)
.map(value -> result.orElse(UnsignedLong.ZERO).plus(value)),
(u, v) -> v);
(u, v) -> v)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment