tracker

package
v1.4.9 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: BSD-3-Clause Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CountingTracker

type CountingTracker interface {
	Add(ids.ShortID)                               // increments total count taken by ID
	AddPool(ids.ShortID)                           // increments pool messages taken by ID
	Remove(ids.ShortID)                            // removes a message taken by ID
	OutstandingCount(ids.ShortID) (uint32, uint32) // returns the total count and pool count
	PoolCount() uint32                             // returns the total count of messages taken from the pool
}

CountingTracker is an interface for tracking peers' usage of a discrete resource

func NewMessageTracker

func NewMessageTracker() CountingTracker

NewMessageTracker returns a CountingTracker to track pending messages from peers

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

NewCPUTracker ...

Jump to

Keyboard shortcuts

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