24#ifndef TABLE_SETUP_METRICS_H
25#define TABLE_SETUP_METRICS_H
145 int rnd_pos(
const void *pos)
override;
147 int index_init(uint idx,
bool sorted)
override;
152 bool read_all)
override;
Definition: pfs_engine_table.h:301
Definition: pfs_engine_table.h:268
An abstract PERFORMANCE_SCHEMA table.
Definition: pfs_engine_table.h:70
Definition: table_setup_metrics.h:78
~PFS_index_setup_metrics_by_name() override=default
PFS_index_setup_metrics_by_name()
Definition: table_setup_metrics.h:80
PFS_key_metric_name m_key
Definition: table_setup_metrics.h:88
bool match(PFS_metric_class *pfs) override
Definition: table_setup_metrics.cc:79
Definition: table_setup_metrics.h:68
virtual bool match(PFS_metric_class *pfs)=0
~PFS_index_setup_metrics() override=default
PFS_index_setup_metrics(PFS_engine_key *key_1)
Definition: table_setup_metrics.h:70
Definition: table_helper.h:1498
Class to hold information regarding a table to be created on behalf of a plugin.
Definition: plugin_table.h:40
Table PERFORMANCE_SCHEMA.SETUP_METRICS.
Definition: table_setup_metrics.h:133
pos_t m_next_pos
Next position.
Definition: table_setup_metrics.h:172
static ha_rows get_row_count()
Definition: table_setup_metrics.cc:91
int index_init(uint idx, bool sorted) override
Definition: table_setup_metrics.cc:141
table_setup_metrics()
Definition: table_setup_metrics.cc:93
pos_t m_pos
Current position.
Definition: table_setup_metrics.h:170
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_setup_metrics.cc:99
static THR_LOCK m_table_lock
Table share lock.
Definition: table_setup_metrics.h:163
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_setup_metrics.cc:87
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_setup_metrics.cc:104
static Plugin_table m_table_def
Table definition.
Definition: table_setup_metrics.h:165
PFS_index_setup_metrics * m_opened_index
Definition: table_setup_metrics.h:174
static PFS_engine_table_share m_share
Table share.
Definition: table_setup_metrics.h:138
PFS_metric_index pos_t
Definition: table_setup_metrics.h:134
int read_row_values(TABLE *table, unsigned char *buf, Field **fields, bool read_all) override
Read the current row values.
Definition: table_setup_metrics.cc:202
int make_row(PFS_metric_class *klass)
Definition: table_setup_metrics.cc:176
int index_next() override
Find key in index, read record.
Definition: table_setup_metrics.cc:152
~table_setup_metrics() override=default
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_setup_metrics.cc:124
row_setup_metrics m_row
Current row.
Definition: table_setup_metrics.h:168
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1141
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
Definition: buf0block_hint.cc:30
Performance schema tables (declarations).
MetricOTELType
Definition: psi_metric_bits.h:32
MetricNumType
Definition: psi_metric_bits.h:38
static const LEX_CSTRING pfs
Definition: sql_show_processlist.cc:66
A PERFORMANCE_SCHEMA table share.
Definition: pfs_engine_table.h:359
Information for all instrumentation.
Definition: pfs_instr_class.h:248
Instrumentation metadata for a metric.
Definition: pfs_instr_class.h:406
Position of a cursor, for metric iterations.
Definition: table_setup_metrics.h:92
uint m_index
Current row index.
Definition: table_setup_metrics.h:94
void set_at(uint index)
Set this index at a given position.
Definition: table_setup_metrics.h:106
PFS_metric_index(uint index)
Constructor.
Definition: table_setup_metrics.h:100
void next()
Set this index to the next record.
Definition: table_setup_metrics.h:124
void set_at(const PFS_metric_index *other)
Set this index at a given position.
Definition: table_setup_metrics.h:112
void set_after(const PFS_metric_index *other)
Set this index after a given position.
Definition: table_setup_metrics.h:118
Definition: thr_lock.h:139
A row of PERFORMANCE_SCHEMA.SETUP_METRICS.
Definition: table_setup_metrics.h:51
PFS_metric_class * m_instr_class
Columns NAME, METER, ENABLED, METRIC_TYPE, NUM_TYPE, UNIT, DESCRIPTION.
Definition: table_setup_metrics.h:53
const char * m_metric
Definition: table_setup_metrics.h:56
uint m_unit_length
Definition: table_setup_metrics.h:61
uint m_metric_length
Definition: table_setup_metrics.h:57
uint m_description_length
Definition: table_setup_metrics.h:63
const char * m_group
Definition: table_setup_metrics.h:58
uint m_group_length
Definition: table_setup_metrics.h:59
const char * m_unit
Definition: table_setup_metrics.h:60
MetricNumType m_num_type
Definition: table_setup_metrics.h:64
MetricOTELType m_metric_type
Definition: table_setup_metrics.h:65
const char * m_description
Definition: table_setup_metrics.h:62
Helpers to implement a performance schema table.