simple_metrics

package
v2.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const PluginCode = "github.com/latolukasz/beeorm/plugins/simple_metrics"

Variables

This section is empty.

Functions

This section is empty.

Types

type MySQLQuery

type MySQLQuery struct {
	Counter     uint64
	SlowQueries uint64
	TotalTime   uint64
	Table       string
	Pool        string
	Operation   MySQLQueryType
}

type MySQLQueryType

type MySQLQueryType uint8
const (
	QUERY MySQLQueryType = iota
	INSERT
	UPDATE
	DELETE
	SHOW
	ALTER
	OTHER
)

type MySQLSLowQuery

type MySQLSLowQuery struct {
	Query    string
	Pool     string
	Duration time.Duration
}

func (*MySQLSLowQuery) String

func (sq *MySQLSLowQuery) String() string

type Options

type Options struct {
	MySQLSlowQueriesLimit int
}

type Plugin

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

func Init

func Init(options *Options) *Plugin

func (*Plugin) ClearMySQLStats

func (p *Plugin) ClearMySQLStats()

func (*Plugin) GetCode

func (p *Plugin) GetCode() string

func (*Plugin) GetMySQLQueriesStats

func (p *Plugin) GetMySQLQueriesStats(l bool) []MySQLQuery

func (*Plugin) GetMySQLSlowQueriesStats

func (p *Plugin) GetMySQLSlowQueriesStats() []*MySQLSLowQuery

func (*Plugin) PluginInterfaceEngineCreated

func (p *Plugin) PluginInterfaceEngineCreated(engine beeorm.Engine)

Jump to

Keyboard shortcuts

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