final long sum = in.readRawVarint64();
final long count = in.readRawVarint64();
final double countPs = in.readDouble();
final int sampleCount = in.readRawVarint32();
BasicRollup statBucket = new BasicRollup();
byte statType;
AbstractRollupStat stat;
// average
statType = in.readRawByte();
stat = getStatFromRollup(statType, statBucket);
setStat(stat, in);
// max
statType = in.readRawByte();
stat = getStatFromRollup(statType, statBucket);
setStat(stat, in);
// min
statType = in.readRawByte();
stat = getStatFromRollup(statType, statBucket);
setStat(stat, in);
// var
statType = in.readRawByte();
stat = getStatFromRollup(statType, statBucket);
setStat(stat, in);
TimerRollup rollup = new TimerRollup()
.withSum(sum)
.withCount(count)
.withCountPS(countPs)
.withSampleCount(sampleCount)
.withAverage(statBucket.getAverage())
.withMaxValue(statBucket.getMaxValue())
.withMinValue(statBucket.getMinValue())
.withVariance(statBucket.getVariance());
int numPercentiles = in.readRawVarint32();
for (int i = 0; i < numPercentiles; i++) {
String name = in.readString();
Number mean = getUnversionedDoubleOrLong(in);