Documentation ¶
Index ¶
- type MockTimeTracker
- func (_m *MockTimeTracker) CumulativeUtilization(_a0 time.Time) float64
- func (_m *MockTimeTracker) Len() int
- func (_m *MockTimeTracker) StartCPU(_a0 ids.ShortID, _a1 time.Time)
- func (_m *MockTimeTracker) StopCPU(_a0 ids.ShortID, _a1 time.Time)
- func (_m *MockTimeTracker) Utilization(_a0 ids.ShortID, _a1 time.Time) float64
- type TimeTracker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockTimeTracker ¶
TimeTracker is an autogenerated mock type for the TimeTracker type
func (*MockTimeTracker) CumulativeUtilization ¶
func (_m *MockTimeTracker) CumulativeUtilization(_a0 time.Time) float64
CumulativeUtilization provides a mock function with given fields: _a0
func (*MockTimeTracker) Len ¶
func (_m *MockTimeTracker) Len() int
Len provides a mock function with given fields:
func (*MockTimeTracker) StartCPU ¶
func (_m *MockTimeTracker) StartCPU(_a0 ids.ShortID, _a1 time.Time)
StartCPU provides a mock function with given fields: _a0, _a1
func (*MockTimeTracker) StopCPU ¶
func (_m *MockTimeTracker) StopCPU(_a0 ids.ShortID, _a1 time.Time)
StopCPU provides a mock function with given fields: _a0, _a1
func (*MockTimeTracker) Utilization ¶
Utilization provides a mock function with given fields: _a0, _a1
type TimeTracker ¶
type TimeTracker interface { StartCPU(ids.ShortID, time.Time) StopCPU(ids.ShortID, time.Time) Utilization(ids.ShortID, time.Time) float64 CumulativeUtilization(time.Time) float64 Len() int }
TimeTracker is an interface for tracking peers' usage of CPU Time
func NewCPUTracker ¶
func NewCPUTracker(factory uptime.Factory, halflife time.Duration) TimeTracker
Click to show internal directories.
Click to hide internal directories.