mutexlatency

package
v1.1.14 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: BSD-2-Clause Imports: 7 Imported by: 0

README

This screen is inspired by this post:

http://www.percona.com/blog/2015/01/06/getting-mutex-information-from-mysqls-performance_schema/i

root@localhost [performance_schema]> select * from setup_instruments limit 10;
+---------------------------------------------------------+---------+-------+
| NAME                                                    | ENABLED | TIMED |
+---------------------------------------------------------+---------+-------+
| wait/synch/mutex/sql/TC_LOG_MMAP::LOCK_tc               | NO      | NO    |
| wait/synch/mutex/sql/LOCK_des_key_file                  | NO      | NO    |
| wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_commit         | NO      | NO    |
| wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_commit_queue   | NO      | NO    |
| wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_done           | NO      | NO    |
| wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_flush_queue    | NO      | NO    |
| wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index          | NO      | NO    |
| wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_log            | NO      | NO    |
| wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_binlog_end_pos | NO      | NO    |
| wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_sync           | NO      | NO    |
+---------------------------------------------------------+---------+-------+
10 rows in set (0.00 sec)

root@localhost [performance_schema]> update setup_instruments set enabled = 'YES', timed = 'YES' where NAME like 'wait/synch/mutex/innodb/%';
Query OK, 49 rows affected (0.02 sec)
Rows matched: 49  Changed: 49  Warnings: 0

Documentation

Overview

Package mutexlatency provides library routines for ps-top. for managing the events_waits_summary_global_by_event_name table.

Package mutexlatency contains the library routines for managing the events_waits_summary_global_by_event_Name table

Package mutexlatency contains the library routines for managing the events_waits_summary_global_by_event_name table

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MutexLatency

type MutexLatency struct {
	baseobject.BaseObject // embedded

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

MutexLatency holds a table of rows

func NewMutexLatency

func NewMutexLatency(cfg *config.Config, db *sql.DB) *MutexLatency

NewMutexLatency returns a mutex latency object using given config and db

func (*MutexLatency) Collect

func (ml *MutexLatency) Collect()

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

func (MutexLatency) HaveRelativeStats

func (ml MutexLatency) HaveRelativeStats() bool

HaveRelativeStats is true for this object

func (*MutexLatency) ResetStatistics added in v1.1.0

func (ml *MutexLatency) ResetStatistics()

ResetStatistics resets the statistics to current values

type Row

type Row struct {
	Name         string
	SumTimerWait uint64
	CountStar    uint64
}

Row contains a row from performance_schema.events_waits_summary_global_by_event_Name

type Rows

type Rows []Row

Rows contains a slice of Row

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳