Documentation ¶
Overview ¶
Package checkindelta contains functions to calculate deltas between snapshots of aggregated checkin battery stats from a device.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeDelta ¶
func ComputeDelta(first, second *bspb.BatteryStats) *bspb.BatteryStats
ComputeDelta takes two protos and outputs a third one that contains the difference between the two. Second will be subtracted from first.
func ComputeDeltaFromSameDevice ¶
func ComputeDeltaFromSameDevice(first, second *bspb.BatteryStats) *bspb.BatteryStats
ComputeDeltaFromSameDevice takes two Batterystats protos taken from the same device and outputs a third one that contains the difference between the two, including fields that can only be subtracted in special cases (same device and same start clock time). Second will be subtracted from first.
func NormalizeStats ¶
func NormalizeStats(p *bspb.BatteryStats) (*bspb.BatteryStats, error)
NormalizeStats takes in a proto and normalizes it by converting any absolute value to value/TotalTime.
Types ¶
This section is empty.