statistics

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: MIT Imports: 9 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 Data

type Data struct {
	BlockStart struct {
		sync.RWMutex
		// contains filtered or unexported fields
	}
	BlockEnd blockEnd

	Speed struct {
		sync.RWMutex
		// contains filtered or unexported fields
	}

	Api  apiResponseTime
	Peer peerPing
	// contains filtered or unexported fields
}

func New

func New() *Data

func (*Data) GetAverageBlockProcessingTime added in v1.1.6

func (d *Data) GetAverageBlockProcessingTime() int64

func (*Data) GetLastBlockInfo added in v1.1.6

func (d *Data) GetLastBlockInfo() LastBlockInfo

func (*Data) GetTimePerBlock added in v1.1.6

func (d *Data) GetTimePerBlock() int64

func (*Data) PushEndBlock added in v1.1.6

func (d *Data) PushEndBlock(req EndRequest)

func (*Data) PushStartBlock added in v1.1.6

func (d *Data) PushStartBlock(req StartRequest)

func (*Data) ResetPeersPing added in v1.1.6

func (d *Data) ResetPeersPing()

func (*Data) SetApiTime

func (d *Data) SetApiTime(duration time.Duration, path string)

func (*Data) SetPeerTime

func (d *Data) SetPeerTime(duration time.Duration, network string)

func (*Data) Statistic

func (d *Data) Statistic(ctx context.Context)

type EndRequest added in v1.1.6

type EndRequest struct {
	TimeEnd time.Time
	Height  int64
}

type LastBlockInfo added in v1.1.6

type LastBlockInfo struct {
	Height          int64
	Duration        int64
	HeaderTimestamp time.Time
}

type StartRequest added in v1.1.6

type StartRequest struct {
	Height     int64
	Now        time.Time
	HeaderTime time.Time
}

Jump to

Keyboard shortcuts

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