statistics

package
v1.4.12 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: GPL-3.0 Imports: 16 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

View Source
var ErrInvalidRefreshIntervalValue = errors.New("invalid refresh interval value")

ErrInvalidRefreshIntervalValue signals that an invalid value for the refresh interval was provided

View Source
var ErrNilNetworkStatisticsProvider = errors.New("nil network statistics provider")

ErrNilNetworkStatisticsProvider signals that a nil network statistics provider was provided

Functions

func GetRuntimeStatistics

func GetRuntimeStatistics() []interface{}

GetRuntimeStatistics will return the statistics regarding the current time, memory consumption and the number of running go routines These return statistics can be easily output in a log line

func NewResourceMonitor

func NewResourceMonitor(config config.Config, netStats NetworkStatisticsProvider) (*resourceMonitor, error)

NewResourceMonitor creates a new ResourceMonitor instance

Types

type NetworkStatisticsProvider

type NetworkStatisticsProvider interface {
	TotalSentInCurrentEpoch() string
	TotalReceivedInCurrentEpoch() string
	EpochConfirmed(epoch uint32, timestamp uint64)
	IsInterfaceNil() bool
}

NetworkStatisticsProvider is able to provide network statistics

type ResourceMonitorHandler

type ResourceMonitorHandler interface {
	GenerateStatistics() []interface{}
	StartMonitoring()
	Close() error
	IsInterfaceNil() bool
}

ResourceMonitorHandler defines the resource monitor supported actions

type SoftwareVersionChecker

type SoftwareVersionChecker interface {
	StartCheckSoftwareVersion()
	IsInterfaceNil() bool
	Close() error
}

SoftwareVersionChecker holds the actions needed to be handled by a components which will check the software version

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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