tracker

package
v1.5.3-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2021 License: BSD-3-Clause Imports: 5 Imported by: 30

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockTimeTracker added in v1.4.10

type MockTimeTracker struct {
	mock.Mock
}

TimeTracker is an autogenerated mock type for the TimeTracker type

func (*MockTimeTracker) CumulativeUtilization added in v1.4.10

func (_m *MockTimeTracker) CumulativeUtilization(_a0 time.Time) float64

CumulativeUtilization provides a mock function with given fields: _a0

func (*MockTimeTracker) EndInterval added in v1.4.10

func (_m *MockTimeTracker) EndInterval(_a0 time.Time)

EndInterval provides a mock function with given fields: _a0

func (*MockTimeTracker) Len added in v1.4.10

func (_m *MockTimeTracker) Len() int

Len provides a mock function with given fields:

func (*MockTimeTracker) Utilization added in v1.4.10

func (_m *MockTimeTracker) Utilization(_a0 ids.ShortID, _a1 time.Time) float64

Utilization provides a mock function with given fields: _a0, _a1

func (*MockTimeTracker) UtilizeTime added in v1.4.10

func (_m *MockTimeTracker) UtilizeTime(_a0 ids.ShortID, _a1 time.Time, _a2 time.Time)

UtilizeTime provides a mock function with given fields: _a0, _a1, _a2

type TimeTracker

type TimeTracker interface {
	UtilizeTime(ids.ShortID, time.Time, time.Time)
	Utilization(ids.ShortID, time.Time) float64
	CumulativeUtilization(time.Time) float64
	Len() int
	EndInterval(time.Time)
}

TimeTracker is an interface for tracking peers' usage of CPU Time

func NewCPUTracker

func NewCPUTracker(factory uptime.Factory, halflife time.Duration) TimeTracker

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL