offline_stat

package
v0.0.0-...-66c7839 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryEventBegin = "BEGIN"
)

Variables

This section is empty.

Functions

func Start

func Start(offlineStatCfg *config.OfflineStatConfig)

Types

type BinlogFile

type BinlogFile struct {
	StartLogFile string `json:"start_log_file"`
	StartLogPos  uint32 `json:"start_log_pos"`
}

func (*BinlogFile) FilePos

func (this *BinlogFile) FilePos() string

type DmlStat

type DmlStat struct {
	InsertCount int `json:"insert_count"`
	UpdateCount int `json:"update_count"`
	DeleteCount int `json:"delete_count"`
}

func (*DmlStat) DmlCount

func (this *DmlStat) DmlCount() int

type OfflineStat

type OfflineStat struct {
	OfflineStatCfg         *config.OfflineStatConfig
	TotalTableStatMap      map[string]*TableBinlogStat
	TotalThreadStatMap     map[uint32]*ThreadBinlogStat
	TotalTransactionStats  []*TransactionBinlogStat
	TotalTimestampStats    []*TimestampBinlogStat
	CurrentTimestampStat   *TimestampBinlogStat
	CurrentTransactionStat *TransactionBinlogStat
	CurrentTreadId         uint32
	CurrentXid             uint64
	CurrentTimestamp       uint32
	CurrentSchemaName      string
	CurrentTableName       string
	CurrentLogFile         string
	CurrentLogPos          uint32
}

func NewOfflineStat

func NewOfflineStat(cfg *config.OfflineStatConfig) *OfflineStat

func (*OfflineStat) Start

func (this *OfflineStat) Start() error

func (*OfflineStat) TimestampStatToFile

func (this *OfflineStat) TimestampStatToFile()

func (*OfflineStat) XidStatToFile

func (this *OfflineStat) XidStatToFile()

type TableBinlogStat

type TableBinlogStat struct {
	DmlStat
	SchemaName  string `json:"schema_name"`
	TableName   string `json:"table_name"`
	AppearCount int64  `json:"appear_count"`
}

type ThreadBinlogStat

type ThreadBinlogStat struct {
	DmlStat
	ThreadId    uint32 `json:"thread_id"`
	AppearCount int64  `json:"appear_count"`
}

type TimestampBinlogStat

type TimestampBinlogStat struct {
	DmlStat
	BinlogFile
	Timestamp uint32 `json:"timestamp"`
	TxCount   int64  `json:"tx_count"`
}

func NewTimestampBinlogStat

func NewTimestampBinlogStat(timestamp uint32, startLogFile string, startLogPos uint32) *TimestampBinlogStat

type TransactionBinlogStat

type TransactionBinlogStat struct {
	DmlStat
	BinlogFile
	Xid       uint64 `json:"xid"`
	Timestamp uint32 `json:"timestamp"`
}

func NewTransactionBinlogStat

func NewTransactionBinlogStat(timestamp uint32, startLogFile string, startLogPos uint32) *TransactionBinlogStat

Jump to

Keyboard shortcuts

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