MySQL 9.1.0
Source Code Documentation
table_performance_timers.h
Go to the documentation of this file.
1/* Copyright (c) 2008, 2024, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef TABLE_PERFORMANCE_TIMERS_H
25#define TABLE_PERFORMANCE_TIMERS_H
26
27/**
28 @file storage/perfschema/table_performance_timers.h
29 Table PERFORMANCE_TIMERS (declarations).
30*/
31
32#include "my_base.h"
33#include "my_rdtsc.h"
36
37class Field;
38class Plugin_table;
39struct TABLE;
40struct THR_LOCK;
41
42/**
43 @addtogroup performance_schema_tables
44 @{
45*/
46
47/** A row of PERFORMANCE_SCHEMA.PERFORMANCE_TIMERS. */
49 /** Column TIMER_NAME. */
51 /**
52 Columns ROUTINE (not displayed), TIMER_OVERHEAD,
53 TIMER_FREQUENCY, TIMER_RESOLUTION.
54 */
56};
57
58/** Table PERFORMANCE_SCHEMA.PERFORMANCE_TIMERS. */
60 public:
61 /** Table share. */
64 static ha_rows get_row_count();
65
66 int rnd_next() override;
67 int rnd_pos(const void *pos) override;
68 void reset_position() override;
69
70 protected:
71 int read_row_values(TABLE *table, unsigned char *buf, Field **fields,
72 bool read_all) override;
73
74 protected:
76
77 public:
78 ~table_performance_timers() override = default;
79
80 private:
81 /** Table share lock. */
83 /** Table definition. */
85
86 /** Current row. */
88 /** Current position. */
90 /** Next position. */
93};
94
95/** @} */
96#endif
Definition: field.h:577
An abstract PERFORMANCE_SCHEMA table.
Definition: pfs_engine_table.h:70
Class to hold information regarding a table to be created on behalf of a plugin.
Definition: plugin_table.h:40
Table PERFORMANCE_SCHEMA.PERFORMANCE_TIMERS.
Definition: table_performance_timers.h:59
static Plugin_table m_table_def
Table definition.
Definition: table_performance_timers.h:84
PFS_simple_index m_next_pos
Next position.
Definition: table_performance_timers.h:91
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_performance_timers.cc:132
static THR_LOCK m_table_lock
Table share lock.
Definition: table_performance_timers.h:82
PFS_simple_index m_pos
Current position.
Definition: table_performance_timers.h:89
row_performance_timers * m_row
Current row.
Definition: table_performance_timers.h:87
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_performance_timers.cc:115
static PFS_engine_table_share m_share
Table share.
Definition: table_performance_timers.h:62
table_performance_timers()
Definition: table_performance_timers.cc:82
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_performance_timers.cc:110
int read_row_values(TABLE *table, unsigned char *buf, Field **fields, bool read_all) override
Read the current row values.
Definition: table_performance_timers.cc:139
row_performance_timers m_data[COUNT_TIMER_NAME]
Definition: table_performance_timers.h:92
static ha_rows get_row_count()
Definition: table_performance_timers.cc:80
~table_performance_timers() override=default
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_performance_timers.cc:76
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1141
Multi-platform timer code.
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
Definition: buf0block_hint.cc:30
Data types for columns used in the performance schema tables (declarations)
#define COUNT_TIMER_NAME
Integer, number of values of.
Definition: pfs_column_types.h:101
enum_timer_name
Enum values for the TIMER_NAME columns.
Definition: pfs_column_types.h:88
Performance schema tables (declarations).
A PERFORMANCE_SCHEMA table share.
Definition: pfs_engine_table.h:359
Position of a cursor, for simple iterations.
Definition: pfs_engine_table.h:567
Definition: table.h:1421
Definition: thr_lock.h:139
Characteristics of a timer.
Definition: my_rdtsc.h:38
A row of PERFORMANCE_SCHEMA.PERFORMANCE_TIMERS.
Definition: table_performance_timers.h:48
struct my_timer_unit_info m_info
Columns ROUTINE (not displayed), TIMER_OVERHEAD, TIMER_FREQUENCY, TIMER_RESOLUTION.
Definition: table_performance_timers.h:55
enum_timer_name m_timer_name
Column TIMER_NAME.
Definition: table_performance_timers.h:50