MySQL 8.3.0
Source Code Documentation
table_performance_timers.h
Go to the documentation of this file.
1/* Copyright (c) 2008, 2023, 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 also distributed 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 included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef TABLE_PERFORMANCE_TIMERS_H
24#define TABLE_PERFORMANCE_TIMERS_H
25
26/**
27 @file storage/perfschema/table_performance_timers.h
28 Table PERFORMANCE_TIMERS (declarations).
29*/
30
31#include "my_base.h"
32#include "my_rdtsc.h"
35
36class Field;
37class Plugin_table;
38struct TABLE;
39struct THR_LOCK;
40
41/**
42 @addtogroup performance_schema_tables
43 @{
44*/
45
46/** A row of PERFORMANCE_SCHEMA.PERFORMANCE_TIMERS. */
48 /** Column TIMER_NAME. */
50 /**
51 Columns ROUTINE (not displayed), TIMER_OVERHEAD,
52 TIMER_FREQUENCY, TIMER_RESOLUTION.
53 */
55};
56
57/** Table PERFORMANCE_SCHEMA.PERFORMANCE_TIMERS. */
59 public:
60 /** Table share. */
63 static ha_rows get_row_count();
64
65 int rnd_next() override;
66 int rnd_pos(const void *pos) override;
67 void reset_position() override;
68
69 protected:
70 int read_row_values(TABLE *table, unsigned char *buf, Field **fields,
71 bool read_all) override;
72
73 protected:
75
76 public:
77 ~table_performance_timers() override = default;
78
79 private:
80 /** Table share lock. */
82 /** Table definition. */
84
85 /** Current row. */
87 /** Current position. */
89 /** Next position. */
92};
93
94/** @} */
95#endif
Definition: field.h:574
An abstract PERFORMANCE_SCHEMA table.
Definition: pfs_engine_table.h:69
Class to hold information regarding a table to be created on behalf of a plugin.
Definition: plugin_table.h:39
Table PERFORMANCE_SCHEMA.PERFORMANCE_TIMERS.
Definition: table_performance_timers.h:58
static Plugin_table m_table_def
Table definition.
Definition: table_performance_timers.h:83
PFS_simple_index m_next_pos
Next position.
Definition: table_performance_timers.h:90
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_performance_timers.cc:131
static THR_LOCK m_table_lock
Table share lock.
Definition: table_performance_timers.h:81
PFS_simple_index m_pos
Current position.
Definition: table_performance_timers.h:88
row_performance_timers * m_row
Current row.
Definition: table_performance_timers.h:86
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_performance_timers.cc:114
static PFS_engine_table_share m_share
Table share.
Definition: table_performance_timers.h:61
table_performance_timers()
Definition: table_performance_timers.cc:81
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_performance_timers.cc:109
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:138
row_performance_timers m_data[COUNT_TIMER_NAME]
Definition: table_performance_timers.h:91
static ha_rows get_row_count()
Definition: table_performance_timers.cc:79
~table_performance_timers() override=default
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_performance_timers.cc:75
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1140
Multi-platform timer code.
static PFS_engine_table_share_proxy table
Definition: pfs.cc:60
Definition: buf0block_hint.cc:29
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:95
enum_timer_name
Enum values for the TIMER_NAME columns.
Definition: pfs_column_types.h:82
Performance schema tables (declarations).
A PERFORMANCE_SCHEMA table share.
Definition: pfs_engine_table.h:357
Position of a cursor, for simple iterations.
Definition: pfs_engine_table.h:557
Definition: table.h:1403
Definition: thr_lock.h:138
Characteristics of a timer.
Definition: my_rdtsc.h:37
A row of PERFORMANCE_SCHEMA.PERFORMANCE_TIMERS.
Definition: table_performance_timers.h:47
struct my_timer_unit_info m_info
Columns ROUTINE (not displayed), TIMER_OVERHEAD, TIMER_FREQUENCY, TIMER_RESOLUTION.
Definition: table_performance_timers.h:54
enum_timer_name m_timer_name
Column TIMER_NAME.
Definition: table_performance_timers.h:49