collector

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

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

type Collector

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

func New

func New(dsn string, scrapeInterval time.Duration, logger logger.Logger) (*Collector, error)

func (*Collector) Close

func (c *Collector) Close() error

func (*Collector) Collect

func (c *Collector) Collect(ch chan<- prometheus.Metric)

func (*Collector) Describe

func (c *Collector) Describe(ch chan<- *prometheus.Desc)

type Connection added in v1.0.4

type Connection struct {
	DB            sql.NullString
	User          sql.NullString
	Query         sql.NullString
	State         sql.NullString
	QueryStart    sql.NullTime
	BackendType   sql.NullString
	WaitEventType sql.NullString
	BlockingPid   sql.NullInt32
}

func (Connection) IsClientBackend added in v1.0.4

func (c Connection) IsClientBackend() bool

func (Connection) QueryKey added in v1.0.4

func (c Connection) QueryKey() QueryKey

type ConnectionKey added in v1.0.4

type ConnectionKey struct {
	QueryKey
	State         string
	WaitEventType string
}

type LatencySummary

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

func NewLatencySummary

func NewLatencySummary() *LatencySummary

func (*LatencySummary) Add

func (s *LatencySummary) Add(totalTime float64, numberOfEvents uint64)

func (*LatencySummary) GetCalls added in v1.0.4

func (s *LatencySummary) GetCalls() float64

func (*LatencySummary) GetSummaries added in v1.0.4

func (s *LatencySummary) GetSummaries(percentiles ...float64) map[string]float64

func (*LatencySummary) GetTotalTime added in v1.0.4

func (s *LatencySummary) GetTotalTime() float64

type QueryKey added in v1.0.4

type QueryKey struct {
	Query string
	DB    string
	User  string
}

func (QueryKey) EqualByQueryPrefix added in v1.0.4

func (k QueryKey) EqualByQueryPrefix(other QueryKey) bool

type QuerySummary

type QuerySummary struct {
	Queries   float64
	TotalTime float64
	IOTime    float64
}

type Setting added in v1.0.4

type Setting struct {
	Name  string
	Unit  string
	Value float64
}

Jump to

Keyboard shortcuts

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