示例#1
0
func (ie interfaceNumericals) Delta(id *types.Interface, ii, previousi InterfaceInfo) {
	in, out := ie.InOut(ii)
	previous_in, previous_out := ie.InOut(previousi)
	id.DeltaIn = ps(in, previous_in)
	id.DeltaOut = ps(out, previous_out)
}
示例#2
0
func (_ interfaceBytes) Delta(id *types.Interface, ii, pi InterfaceInfo) {
	id.DeltaIn = bps(8, ii.InBytes, pi.InBytes)
	id.DeltaOut = bps(8, ii.OutBytes, pi.OutBytes)
}
示例#3
0
func (ie interfaceNumericals) Current(id *types.Interface, ii InterfaceInfo) {
	in, out := ie.InOut(ii)
	id.In = humanUnitless(uint64(in))
	id.Out = humanUnitless(uint64(out))
}
示例#4
0
func (_ interfaceBytes) Current(id *types.Interface, ii InterfaceInfo) {
	id.In = humanB(uint64(ii.InBytes))
	id.Out = humanB(uint64(ii.OutBytes))
}