}
private static void serializeTimer(TimerRollup rollup, byte[] buf) throws IOException {
CodedOutputStream out = CodedOutputStream.newInstance(buf);
timerRollupSize.update(buf.length);
out.writeRawByte(Constants.VERSION_1_TIMER);
// sum, count, countps, avg, max, min, var
out.writeRawVarint64(rollup.getSum());
out.writeRawVarint64(rollup.getCount());
out.writeDoubleNoTag(rollup.getRate());