statistics

package
v1.7.10 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

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

View Source
var ErrNilStateStatsHandler = errors.New("nil state statistics handler")

ErrNilStateStatsHandler signals that a nil state statistics handler 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

func NewStateStatistics added in v1.7.0

func NewStateStatistics() *stateStatistics

NewStateStatistics returns a structure able to collect statistics for state

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