user_latency

package
v0.7.17 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package user_latency manages the output from INFORMATION_SCHEMA.PROCESSLIST

Package user_latency file contains the library routines for managing the information_schema.processlist table.

Package user_latency file contains the library routines for managing the information_schema.processlist table.

Package user_latency contains library routines for ps-top related to the INFORMATION_SCHEMA.PROCESSLIST table.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByRunTime

type ByRunTime PlByUserRows

ByRunTime is for sorting rows by runtime

func (ByRunTime) Len

func (t ByRunTime) Len() int

func (ByRunTime) Less

func (t ByRunTime) Less(i, j int) bool

func (ByRunTime) Swap

func (t ByRunTime) Swap(i, j int)

type PlByUserRow

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

PlByUserRow contains a summary row of information taken from information_schema.processlist

func (PlByUserRow) String

func (r PlByUserRow) String() string

describe a whole row

type PlByUserRows

type PlByUserRows []PlByUserRow

PlByUserRows contains a slice of PlByUserRow rows

func (PlByUserRows) Headings

func (t PlByUserRows) Headings() string

Headings provides a heading for the rows

func (PlByUserRows) Sort

func (t PlByUserRows) Sort()

Sort by User rows

func (PlByUserRows) String

func (t PlByUserRows) String() string

describe a whole table

type Row

type Row struct {
	ID uint64
	// contains filtered or unexported fields
}

Row contains a row from from information_schema.processlist

type Rows

type Rows []Row

Rows contains a slice of Row

func (Rows) String

func (t Rows) String() string

describe a whole table

type UserLatency added in v0.7.16

type UserLatency struct {
	baseobject.BaseObject

	Results PlByUserRows // results by user
	Totals  PlByUserRow  // totals of results
	// contains filtered or unexported fields
}

UserLatency contains a table of rows

func NewUserLatency added in v0.7.6

func NewUserLatency(ctx *context.Context, db *sql.DB) *UserLatency

NewUserLatency returns a user latency object

func (*UserLatency) Collect added in v0.7.16

func (ul *UserLatency) 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 (UserLatency) Description added in v0.7.16

func (ul UserLatency) Description() string

Description returns a string description of the data being returned

func (UserLatency) EmptyRowContent added in v0.7.16

func (ul UserLatency) EmptyRowContent() string

EmptyRowContent returns an empty string representing the view values

func (UserLatency) HaveRelativeStats added in v0.7.16

func (ul UserLatency) HaveRelativeStats() bool

HaveRelativeStats returns if we have relative information

func (UserLatency) Headings added in v0.7.16

func (ul UserLatency) Headings() string

Headings returns a string representing the view headings

func (UserLatency) Len added in v0.7.16

func (ul UserLatency) Len() int

Len returns the length of the result set

func (UserLatency) RowContent added in v0.7.16

func (ul UserLatency) RowContent() []string

RowContent returns a string representing the row's view values

func (*UserLatency) SetFirstFromLast added in v0.7.16

func (ul *UserLatency) SetFirstFromLast()

SetFirstFromLast - NOT IMPLEMENTED

func (UserLatency) TotalRowContent added in v0.7.16

func (ul UserLatency) TotalRowContent() string

TotalRowContent returns a string representing the total view values

Jump to

Keyboard shortcuts

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