tableio

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package tableio contains the routines for managing performance_schema.tableio_waits_by_table.

Package tableio contains the routines for managing performance_schema.tableio_waits_by_table.

Package tableio contains the routines for managing table_io_waits_by_table.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Row

type Row struct {
	Name string // we don't keep the retrieved columns but store the generated table name

	SumTimerWait   uint64
	SumTimerRead   uint64
	SumTimerWrite  uint64
	SumTimerFetch  uint64
	SumTimerInsert uint64
	SumTimerUpdate uint64
	SumTimerDelete uint64

	CountStar   uint64
	CountRead   uint64
	CountWrite  uint64
	CountFetch  uint64
	CountInsert uint64
	CountUpdate uint64
	CountDelete uint64
}

Row contains w from table_io_waits_summary_by_table

func (*Row) HasData

func (row *Row) HasData() bool

HasData indicates if there is data in the row (for counting valid rows)

type Rows

type Rows []Row

Rows contains a set of rows

type TableIo

type TableIo struct {
	baseobject.BaseObject

	Results Rows // results (maybe with subtraction)
	Totals  Row  // totals of results
	// contains filtered or unexported fields
}

TableIo contains performance_schema.table_io_waits_summary_by_table data

func NewTableIo

func NewTableIo(cfg *config.Config, db *sql.DB) *TableIo

NewTableIo returns an i/o latency object with config and db handle

func (*TableIo) Collect

func (tiol *TableIo) Collect()

Collect collects data from the db, updating initial values if needed, and then subtracting initial values if we want relative values, after which it stores totals.

func (TableIo) HaveRelativeStats

func (tiol TableIo) HaveRelativeStats() bool

HaveRelativeStats is true for this object

func (*TableIo) ResetStatistics added in v1.1.0

func (tiol *TableIo) ResetStatistics()

ResetStatistics resets the statistics to current values

func (TableIo) WantsLatency

func (tiol TableIo) WantsLatency() bool

WantsLatency returns whether we want to see latency information

Jump to

Keyboard shortcuts

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