deserialize total ticks

This commit is contained in:
Mahmood Ali
2019-03-30 07:14:57 -04:00
parent a880f93a61
commit 484ccfafab

View File

@@ -502,6 +502,12 @@ func resourceUsageFromProto(pb *proto.TaskResourceUsage) *ResourceUsage {
cpu.Measured = append(cpu.Measured, "Throttled Time")
case proto.CPUUsage_PERCENT:
cpu.Percent = pb.Cpu.Percent
// total ticks is derived from percent, and should always be set together
// even if "Total Ticks" is not marked as an explicit measured field
cpu.TotalTicks = pb.Cpu.TotalTicks
cpu.Measured = append(cpu.Measured, "Percent")
}
}