requestmetrics

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestMetrics

type RequestMetrics struct {
	// contains filtered or unexported fields
}

RequestMetrics keep count on data sent and received. First sent and last received message time

func (*RequestMetrics) Metrics

func (resp *RequestMetrics) Metrics() (time.Duration, uint64, uint64)

Metrics get action metrics

func (*RequestMetrics) Reset

func (resp *RequestMetrics) Reset()

Reset action metrics

func (*RequestMetrics) Update

func (resp *RequestMetrics) Update(sentTS, receivedTS time.Time, sentData, receivedData int64) error

Update action metrics with more data

func (*RequestMetrics) UpdateReceived

func (resp *RequestMetrics) UpdateReceived(receivedTS time.Time, receivedData int64) error

UpdateReceived metrics

func (*RequestMetrics) UpdateSent

func (resp *RequestMetrics) UpdateSent(sentTS time.Time, sentData int64) error

UpdateSent metrics

Jump to

Keyboard shortcuts

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