OnlineCannyAvgSummarizer s = super.extractState(result, sumBuf);
if (s == null) {
sumBuf.reset();
s = sumBuf;
}
s.update(x, sample.getTime());
super.saveState(result, sumBuf);
} catch (IOException exc) {
// should not happen .
// otherwise, probably a bad practice.