tracker

package
v1.7.11-rc.4 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: BSD-3-Clause Imports: 6 Imported by: 22

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
}

MockTimeTracker is an autogenerated mock type for the MockTimeTracker 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) Len added in v1.4.10

func (_m *MockTimeTracker) Len() int

Len provides a mock function with given fields:

func (*MockTimeTracker) StartCPU added in v1.7.5

func (_m *MockTimeTracker) StartCPU(_a0 ids.NodeID, _a1 time.Time)

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

func (*MockTimeTracker) StopCPU added in v1.7.5

func (_m *MockTimeTracker) StopCPU(_a0 ids.NodeID, _a1 time.Time)

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

func (*MockTimeTracker) Utilization added in v1.4.10

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

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

type TimeTracker

type TimeTracker interface {
	StartCPU(ids.NodeID, time.Time)
	StopCPU(ids.NodeID, time.Time)
	Utilization(ids.NodeID, 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

Jump to

Keyboard shortcuts

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