MySQL  8.0.21
Source Code Documentation
ShowStatus Struct Reference

Callback for collecting mutex statistics. More...

Classes

struct  GetCount
 Collect the individual latch counts. More...
 
struct  OrderByWaits
 Order by m_waits, in descending order. More...
 
struct  Value
 For tracking the mutex metrics. More...
 

Public Types

typedef std::vector< Value, ut_allocator< Value > > Values
 

Public Member Functions

 ShowStatus ()
 Constructor. More...
 
bool operator() (latch_meta_t &latch_meta) 1
 Callback for collecting the stats. More...
 
bool to_string (handlerton *hton, THD *thd, stat_print_fn *stat_print) 1
 Implements the SHOW MUTEX STATUS command, for mutexes. More...
 

Public Attributes

Values m_values
 For collecting the active mutex stats. More...
 

Detailed Description

Callback for collecting mutex statistics.

Member Typedef Documentation

◆ Values

typedef std::vector<Value, ut_allocator<Value> > ShowStatus::Values

Constructor & Destructor Documentation

◆ ShowStatus()

ShowStatus::ShowStatus ( )
inline

Constructor.

Member Function Documentation

◆ operator()()

bool ShowStatus::operator() ( latch_meta_t latch_meta)
inline

Callback for collecting the stats.

Parameters
[in]latch_metaLatch meta data
Returns
always returns true

◆ to_string()

bool ShowStatus::to_string ( handlerton hton,
THD thd,
stat_print_fn stat_print 
)

Implements the SHOW MUTEX STATUS command, for mutexes.

The table structure is like so: Engine | Mutex Name | Status We store the metrics in the "Status" column as:

    spins=N,waits=N,calls=N"

The user has to parse the data unfortunately

Parameters
[in,out]htonthe innodb handlerton
[in,out]thdthe MySQL query thread of the caller
[in,out]stat_printfunction for printing statistics
Returns
true on success.

Member Data Documentation

◆ m_values

Values ShowStatus::m_values

For collecting the active mutex stats.


The documentation for this struct was generated from the following file: