metric

package
v0.0.0-...-69c43f4 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMetric

func CreateMetric(r base.Runner)

Types

type Combine

type Combine struct {
	Total uint64 // total number
	Delta        // delta
}

func (*Combine) Set

func (c *Combine) Set(val uint64)

type Delta

type Delta struct {
	Value uint64 // current value
}

func (*Delta) Update

func (d *Delta) Update()

type Metric

type Metric struct {
	PullCmdCount    Combine
	BypassCmdCount  Combine
	PushCmdCount    Combine
	SuccessCmdCount Combine
	FailCmdCount    Combine

	Delay       Percent // ms
	AvgDelay    Percent // ms
	NetworkFlow Combine // +speed

	FullSyncProgress uint64
}

main struct

var (
	MetricVar *Metric
)

func (*Metric) AddBypassCmdCount

func (m *Metric) AddBypassCmdCount(val uint64)

func (*Metric) AddDelay

func (m *Metric) AddDelay(val uint64)

func (*Metric) AddFailCmdCount

func (m *Metric) AddFailCmdCount(val uint64)

func (*Metric) AddNetworkFlow

func (m *Metric) AddNetworkFlow(val uint64)

func (*Metric) AddPullCmdCount

func (m *Metric) AddPullCmdCount(val uint64)

func (*Metric) AddPushCmdCount

func (m *Metric) AddPushCmdCount(val uint64)

func (*Metric) AddSuccessCmdCount

func (m *Metric) AddSuccessCmdCount(val uint64)

func (*Metric) GetAvgDelay

func (m *Metric) GetAvgDelay() interface{}

func (*Metric) GetBypassCmdCount

func (m *Metric) GetBypassCmdCount() interface{}

func (*Metric) GetBypassCmdCountTotal

func (m *Metric) GetBypassCmdCountTotal() interface{}

func (*Metric) GetDelay

func (m *Metric) GetDelay() interface{}

func (*Metric) GetFailCmdCount

func (m *Metric) GetFailCmdCount() interface{}

func (*Metric) GetFailCmdCountTotal

func (m *Metric) GetFailCmdCountTotal() interface{}

func (*Metric) GetFullSyncProgress

func (m *Metric) GetFullSyncProgress() interface{}

func (*Metric) GetNetworkFlow

func (m *Metric) GetNetworkFlow() interface{}

func (*Metric) GetNetworkFlowTotal

func (m *Metric) GetNetworkFlowTotal() interface{}

func (*Metric) GetPullCmdCount

func (m *Metric) GetPullCmdCount() interface{}

func (*Metric) GetPullCmdCountTotal

func (m *Metric) GetPullCmdCountTotal() interface{}

func (*Metric) GetPushCmdCount

func (m *Metric) GetPushCmdCount() interface{}

func (*Metric) GetPushCmdCountTotal

func (m *Metric) GetPushCmdCountTotal() interface{}

func (*Metric) GetSuccessCmdCount

func (m *Metric) GetSuccessCmdCount() interface{}

func (*Metric) GetSuccessCmdCountTotal

func (m *Metric) GetSuccessCmdCountTotal() interface{}

func (*Metric) SetFullSyncProgress

func (m *Metric) SetFullSyncProgress(val uint64)

type MetricRest

type MetricRest struct {
	StartTime            interface{}
	PullCmdCount         interface{}
	PullCmdCountTotal    interface{}
	BypassCmdCount       interface{}
	BypassCmdCountTotal  interface{}
	PushCmdCount         interface{}
	PushCmdCountTotal    interface{}
	SuccessCmdCount      interface{}
	SuccessCmdCountTotal interface{}
	FailCmdCount         interface{}
	FailCmdCountTotal    interface{}
	Delay                interface{}
	AvgDelay             interface{}
	NetworkSpeed         interface{} // network speed
	NetworkFlowTotal     interface{} // total network speed
	FullSyncProgress     interface{}
	Status               interface{}
	SenderBufCount       interface{} // length of sender buffer
	ProcessingCmdCount   interface{} // length of delay channel
	TargetDBOffset       interface{} // target redis offset
	SourceDBOffset       interface{} // source redis offset
}

func NewMetricRest

func NewMetricRest() *MetricRest

type Op

type Op interface {
	Update()
}

type Percent

type Percent struct {
	Dividend uint64
	Divisor  uint64
}

func (*Percent) Get

func (p *Percent) Get(returnString bool) interface{}

input: return string?

func (*Percent) Set

func (p *Percent) Set(dividend, divisor uint64)

func (*Percent) Update

func (p *Percent) Update()

Jump to

Keyboard shortcuts

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