simple_metrics

package
v2.10.2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ALTER = MySQLQueryType("ALTER")
View Source
const DELETE = MySQLQueryType("DELETE")
View Source
const INSERT = MySQLQueryType("INSERT")
View Source
const OTHER = MySQLQueryType("OTHER")
View Source
const PluginCode = "github.com/latolukasz/beeorm/plugins/simple_metrics"
View Source
const QUERY = MySQLQueryType("QUERY")
View Source
const SHOW = MySQLQueryType("SHOW")
View Source
const UPDATE = MySQLQueryType("UPDATE")

Variables

This section is empty.

Functions

func DisableMetrics added in v2.7.5

func DisableMetrics(engine beeorm.Engine)

func SetTagName added in v2.9.0

func SetTagName(engine beeorm.Engine, tag string)

Types

type MySQLQuery

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

type MySQLQueryType

type MySQLQueryType string

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(tag string) []MySQLQuery

func (*Plugin) GetMySQLSlowQueriesStats

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

func (*Plugin) GetTags added in v2.9.0

func (p *Plugin) GetTags() []string

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