stats

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Operation

type Operation struct {
	Count     int
	RowCount  int
	FirstSeen time.Time
	LastSeen  time.Time
}

type Statistics

type Statistics struct {
	EventCounts map[byte]int
	TotalEvents int
	StartTime   time.Time
	Stats       map[string]map[string]*TableStats // db -> table -> stats
}

func NewStatistics

func NewStatistics() *Statistics

func (*Statistics) PrintStats

func (s *Statistics) PrintStats()

func (*Statistics) RecordEventType

func (s *Statistics) RecordEventType(eventType byte)

func (*Statistics) RecordOperation

func (s *Statistics) RecordOperation(database, table, operation string, rowCount int, eventTime time.Time)

type TableStats

type TableStats struct {
	Operations map[string]*Operation // operation -> stats
}

Jump to

Keyboard shortcuts

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