metric

package
v0.0.0-...-5b294ad Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AtomicSpeedCounter

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

func (*AtomicSpeedCounter) Inc

func (p *AtomicSpeedCounter) Inc(i int)

func (*AtomicSpeedCounter) Json

func (p *AtomicSpeedCounter) Json() *CounterStat

func (*AtomicSpeedCounter) Reset

func (p *AtomicSpeedCounter) Reset()

func (*AtomicSpeedCounter) Rotate

func (p *AtomicSpeedCounter) Rotate() int64

return previous intervalSum

func (*AtomicSpeedCounter) Speed

func (p *AtomicSpeedCounter) Speed() int64

func (*AtomicSpeedCounter) String

func (p *AtomicSpeedCounter) String() string

func (*AtomicSpeedCounter) Total

func (p *AtomicSpeedCounter) Total() int64

type CounterStat

type CounterStat struct {
	Total int64 `json:"total"`
	Speed int64 `json:"speed"`
}

type Metric

type Metric struct {
	DateTime           string                             `json:"datetime"`
	Timestamp          int64                              `json:"timestamp"`
	CompareTimes       int                                `json:"comparetimes"`
	Id                 string                             `json:"id"`
	JobId              string                             `json:"jobid"`
	TaskId             string                             `json:"taskid"`
	Db                 int32                              `json:"db"`
	DbKeys             int64                              `json:"dbkeys"`
	Process            int64                              `json:"process"`
	OneCompareFinished bool                               `json:"has_finished"`
	AllFinished        bool                               `json:"all_finished"`
	KeyScan            *CounterStat                       `json:"key_scan"`
	TotalConflict      int64                              `json:"total_conflict"`
	TotalKeyConflict   int64                              `json:"total_key_conflict"`
	TotalFieldConflict int64                              `json:"total_field_conflict"`
	KeyMetric          map[string]map[string]*CounterStat `json:"key_stat"`
	FieldMetric        map[string]map[string]*CounterStat `json:"field_stat"`
}

type MetricItem

type MetricItem struct {
	Type     string       `json:"type"`
	Conflict string       `json:"conflict"`
	Stat     *CounterStat `json:"stat"`
}

type Stat

type Stat struct {
	Scan          AtomicSpeedCounter
	ConflictField [common.EndKeyTypeIndex][common.EndConflict]AtomicSpeedCounter
	ConflictKey   [common.EndKeyTypeIndex][common.EndConflict]AtomicSpeedCounter

	TotalConflictFields int64
	TotalConflictKeys   int64
}

func (*Stat) Reset

func (p *Stat) Reset(clear bool)

func (*Stat) Rotate

func (p *Stat) Rotate()

Jump to

Keyboard shortcuts

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