Skip to content

Commit

Permalink
compute final mean instead of count and denominator, ref #5
Browse files Browse the repository at this point in the history
  • Loading branch information
beniz committed Apr 11, 2017
1 parent e7b0f1c commit 3b8b5e0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions miw/log_record.cc
Original file line number Diff line number Diff line change
Expand Up @@ -580,13 +580,18 @@ namespace miw
jrec[json_fnamec] = jsfc;
}
else if (f.aggregation() == "sum"
|| f.aggregation() == "count"
|| f.aggregation() == "mean")
|| f.aggregation() == "count")
{
jrec[json_fname] = jsf;
if (!jsfh.isNull())
jrec[json_fnameh] = jsfh;
}
else if (f.aggregation() == "mean")
{
if (!jsfh.isNull())
jrec[json_fname] = jsf.asDouble() / jsfh.asDouble();
else jrec[json_fname] = jsf;
}
}
else jrec[json_fname] = jsf;
}
Expand Down

0 comments on commit 3b8b5e0

Please sign in to comment.