191 m_lock_stat.
aggregate(&stat->m_lock_stat);
223 m_read_lock_stat.
aggregate(&stat->m_read_lock_stat);
224 m_write_lock_stat.
aggregate(&stat->m_write_lock_stat);
231 m_read_lock_stat.
reset();
232 m_write_lock_stat.
reset();
257 m_signal_count += stat->m_signal_count;
258 m_broadcast_count += stat->m_broadcast_count;
266 m_broadcast_count = 0;
524 switch (error_operation) {
565 return &
m_stat[error_index];
581 if (max_errors == 0) {
641 for (
uint i = 0; i < common_max; i++) {
707#define COUNT_PFS_TL_LOCK_TYPE 10
716 for (;
pfs < pfs_last;
pfs++) {
725 for (;
pfs < pfs_last;
pfs++, pfs_from++) {
726 pfs->aggregate(pfs_from);
733 for (;
pfs < pfs_last;
pfs++) {
757 for (; stat < stat_last; stat++) {
790 to_stat_last = to_stat + key_count;
792 for (; to_stat < to_stat_last; from_stat++, to_stat++) {
819 stat_last = stat + key_count;
820 for (; stat < stat_last; stat++) {
1048 size_t *stmt_size_start) {
1055 *local_size_start =
m_size;
1064 size_t *stmt_size) {
1153 size_t *controlled_stmt_size_start,
1154 size_t *total_local_size_start,
1155 size_t *total_stmt_size_start) {
1157 controlled_stmt_size_start);
1159 total_stmt_size_start);
1163 size_t controlled_stmt_size_start,
1164 size_t total_local_size_start,
1165 size_t total_stmt_size_start,
1166 size_t *controlled_size,
size_t *total_size) {
1168 controlled_stmt_size_start,
Fido Client Authentication nullptr
Definition: fido_client_plugin.cc:222
#define MY_ZEROFILL
Definition: my_sys.h:136
@ PSI_ERROR_OPERATION_HANDLED
Definition: psi_error_bits.h:38
@ PSI_ERROR_OPERATION_RAISED
Definition: psi_error_bits.h:37
#define MAX_INDEXES
Definition: config.h:210
constexpr bool unlikely(bool expr)
Definition: my_compiler.h:56
unsigned long long int ulonglong
Definition: my_inttypes.h:56
#define MYF(v)
Definition: my_inttypes.h:97
Common header for many mysys elements.
Defines for getting and processing the current system type programmatically.
unsigned long long int my_micro_time()
Return time in microseconds.
Definition: my_systime.h:182
static int count
Definition: myisam_ftdump.cc:43
Type total(const Shards< COUNT > &shards) noexcept
Get the total value of all shards.
Definition: ut0counter.h:333
static int wait(mysql_cond_t *that, mysql_mutex_t *mutex_arg, const char *, unsigned int)
Definition: mysql_cond_v1_native.cc:63
server error instrument data structures (declarations).
Miscellaneous global dependencies (declarations).
#define PFS_MALLOC_ARRAY(k, n, s, T, f)
Helper, to allocate an array of structures.
Definition: pfs_global.h:135
#define PFS_FREE_ARRAY(k, n, s, p)
Helper, to free an array of structures.
Definition: pfs_global.h:152
File containing constants that can be used throughout the server.
static const LEX_CSTRING pfs
Definition: sql_show_processlist.cc:66
Definition: pfs_stat.h:1015
void count_alloc(size_t size)
Definition: pfs_stat.h:1081
size_t m_size
The current memory size allocated.
Definition: pfs_stat.h:1017
size_t m_max_stmt_size
The maximum memory size allocated, for a statement.
Definition: pfs_stat.h:1021
size_t m_max_local_size
The maximum memory size allocated, for a sub statement.
Definition: pfs_stat.h:1019
size_t m_max_session_size
The maximum memory size allocated, for this session.
Definition: pfs_stat.h:1023
void end_top_statement(size_t *stmt_size)
Definition: pfs_stat.h:1040
void count_free(size_t size)
Definition: pfs_stat.h:1088
size_t get_session_size() const
Definition: pfs_stat.h:1126
void end_nested_statement(size_t local_size_start, size_t stmt_size_start, size_t *stmt_size)
Definition: pfs_stat.h:1063
void start_nested_statement(size_t *local_size_start, size_t *stmt_size_start)
Definition: pfs_stat.h:1047
void start_top_statement()
Definition: pfs_stat.h:1032
void reset()
Definition: pfs_stat.h:1025
size_t get_session_max() const
Definition: pfs_stat.h:1128
Definition: pfs_builtin_memory.h:39
Combined statistic.
Definition: pfs_stat.h:130
void reset()
Definition: pfs_stat.h:170
PFS_byte_stat()
Definition: pfs_stat.h:168
ulonglong m_bytes
Byte count statistics.
Definition: pfs_stat.h:132
void aggregate_waits(const PFS_byte_stat *stat)
Aggregate wait stats and event count.
Definition: pfs_stat.h:155
void aggregate_no_check(const PFS_byte_stat *stat)
Aggregate wait stats, event count and byte count.
Definition: pfs_stat.h:143
void aggregate_counted(ulonglong bytes)
Aggregate event count and byte count.
Definition: pfs_stat.h:163
void aggregate_counted()
Aggregate event count and byte count.
Definition: pfs_stat.h:160
void aggregate(ulonglong wait, ulonglong bytes)
Aggregate individual wait time, event count and byte count.
Definition: pfs_stat.h:149
void aggregate(const PFS_byte_stat *stat)
Aggregate wait stats, event count and byte count.
Definition: pfs_stat.h:135
Statistics for conditions usage.
Definition: pfs_stat.h:238
void aggregate(const PFS_cond_stat *stat)
Definition: pfs_stat.h:254
PFS_single_stat m_wait_stat
Wait statistics.
Definition: pfs_stat.h:240
void reset()
Definition: pfs_stat.h:262
Connections statistics.
Definition: pfs_stat.h:1227
PFS_connection_stat()
Definition: pfs_stat.h:1228
void aggregate_active(ulonglong active, ulonglong controlled_memory, ulonglong total_memory)
Definition: pfs_stat.h:1239
ulonglong m_current_connections
Definition: pfs_stat.h:1234
ulonglong m_max_session_controlled_memory
Definition: pfs_stat.h:1236
ulonglong m_max_session_total_memory
Definition: pfs_stat.h:1237
void aggregate_disconnected(ulonglong disconnected, ulonglong controlled_memory, ulonglong total_memory)
Definition: pfs_stat.h:1253
ulonglong m_total_connections
Definition: pfs_stat.h:1235
Statistics for a server error.
Definition: pfs_stat.h:495
ulonglong m_last_seen
Definition: pfs_stat.h:500
void aggregate_count(int error_operation)
Definition: pfs_stat.h:518
ulonglong m_count
Definition: pfs_stat.h:496
PFS_error_single_stat()
Definition: pfs_stat.h:502
ulonglong m_handled_count
Definition: pfs_stat.h:497
ulonglong count() const
Definition: pfs_stat.h:509
ulonglong m_first_seen
First and last seen timestamps.
Definition: pfs_stat.h:499
void reset()
Definition: pfs_stat.h:511
void aggregate(const PFS_error_single_stat *stat)
Definition: pfs_stat.h:539
Statistics for all server errors.
Definition: pfs_stat.h:557
ulonglong count(uint error_index) const
Definition: pfs_stat.h:576
void aggregate(const PFS_error_stat *stat)
Definition: pfs_stat.h:631
const PFS_error_single_stat * get_stat(uint error_index) const
Definition: pfs_stat.h:564
ulonglong count() const
Definition: pfs_stat.h:568
void aggregate_count(int error_index, int error_operation)
Definition: pfs_stat.h:613
PFS_error_single_stat * m_stat
Definition: pfs_stat.h:560
PFS_error_stat()
Definition: pfs_stat.h:562
void init(PFS_builtin_memory_class *memory_class, size_t max_errors)
Definition: pfs_stat.h:580
void aggregate(const PFS_error_single_stat *stat, uint error_index)
Definition: pfs_stat.h:622
void reset()
Definition: pfs_stat.h:603
size_t m_max_errors
The number of errors, including +1 for the NULL row.
Definition: pfs_stat.h:559
void cleanup(PFS_builtin_memory_class *memory_class)
Definition: pfs_stat.h:593
Statistics for FILE I/O.
Definition: pfs_stat.h:272
void sum_waits(PFS_single_stat *stat)
Definition: pfs_stat.h:300
PFS_byte_stat m_read
READ statistics.
Definition: pfs_stat.h:274
void sum(PFS_byte_stat *stat)
Definition: pfs_stat.h:293
PFS_byte_stat m_write
WRITE statistics.
Definition: pfs_stat.h:276
void aggregate(const PFS_file_io_stat *stat)
Definition: pfs_stat.h:286
void reset()
Definition: pfs_stat.h:280
PFS_byte_stat m_misc
Miscellaneous statistics.
Definition: pfs_stat.h:278
Statistics for FILE usage.
Definition: pfs_stat.h:308
ulong m_open_count
Number of current open handles.
Definition: pfs_stat.h:310
void reset()
Reset file statistics.
Definition: pfs_stat.h:319
PFS_file_io_stat m_io_stat
File I/O statistics.
Definition: pfs_stat.h:312
void aggregate(const PFS_file_stat *stat)
Definition: pfs_stat.h:314
Definition: pfs_stat.h:991
size_t m_alloc_count
Definition: pfs_stat.h:992
size_t m_free_count_capacity
Definition: pfs_stat.h:998
size_t m_free_size
Definition: pfs_stat.h:995
size_t m_free_count
Definition: pfs_stat.h:993
size_t m_missing_free_size_capacity
Definition: pfs_stat.h:1003
ssize_t m_high_size_used
Definition: pfs_stat.h:1008
size_t m_alloc_count_capacity
Definition: pfs_stat.h:997
size_t m_alloc_size
Definition: pfs_stat.h:994
size_t m_missing_free_count_capacity
Definition: pfs_stat.h:1002
size_t m_alloc_size_capacity
Definition: pfs_stat.h:999
size_t m_free_size_capacity
Definition: pfs_stat.h:1000
ssize_t m_low_count_used
Definition: pfs_stat.h:1005
ssize_t m_low_size_used
Definition: pfs_stat.h:1007
ssize_t m_high_count_used
Definition: pfs_stat.h:1006
Memory statistics.
Definition: pfs_stat.h:913
size_t m_free_count
Definition: pfs_stat.h:917
size_t m_free_size_capacity
Definition: pfs_stat.h:924
size_t m_alloc_count_capacity
Definition: pfs_stat.h:921
size_t m_alloc_size
Definition: pfs_stat.h:918
size_t m_free_count_capacity
Definition: pfs_stat.h:922
bool m_used
Definition: pfs_stat.h:914
size_t m_alloc_count
Definition: pfs_stat.h:916
size_t m_alloc_size_capacity
Definition: pfs_stat.h:923
size_t m_free_size
Definition: pfs_stat.h:919
Definition: pfs_stat.h:937
std::atomic< size_t > m_free_size_capacity
Definition: pfs_stat.h:948
std::atomic< size_t > m_free_count
Definition: pfs_stat.h:941
std::atomic< size_t > m_free_count_capacity
Definition: pfs_stat.h:946
std::atomic< size_t > m_free_size
Definition: pfs_stat.h:943
void count_global_free(size_t size)
Definition: pfs_stat.h:960
std::atomic< size_t > m_alloc_count_capacity
Definition: pfs_stat.h:945
void count_global_alloc(size_t size)
Definition: pfs_stat.h:958
std::atomic< size_t > m_alloc_size
Definition: pfs_stat.h:942
std::atomic< size_t > m_alloc_count
Definition: pfs_stat.h:940
std::atomic< bool > m_used
Definition: pfs_stat.h:938
std::atomic< size_t > m_alloc_size_capacity
Definition: pfs_stat.h:947
Definition: pfs_stat.h:883
size_t m_alloc_count_delta
Definition: pfs_stat.h:884
size_t m_alloc_size_delta
Definition: pfs_stat.h:885
Definition: pfs_stat.h:888
size_t m_free_size_delta
Definition: pfs_stat.h:890
size_t m_free_count_delta
Definition: pfs_stat.h:889
Statistics for mutex usage.
Definition: pfs_stat.h:177
PFS_single_stat m_wait_stat
Wait statistics.
Definition: pfs_stat.h:179
void aggregate(const PFS_mutex_stat *stat)
Definition: pfs_stat.h:188
void reset()
Definition: pfs_stat.h:195
Statistics for prepared statement usage.
Definition: pfs_stat.h:357
void reset()
Definition: pfs_stat.h:360
PFS_single_stat m_timer1_stat
Definition: pfs_stat.h:358
void aggregate_value(ulonglong value)
Definition: pfs_stat.h:364
void aggregate_counted()
Definition: pfs_stat.h:362
void aggregate(PFS_stage_stat *stat)
Definition: pfs_stat.h:368
Statistics for rwlock usage.
Definition: pfs_stat.h:204
void aggregate(const PFS_rwlock_stat *stat)
Definition: pfs_stat.h:220
void reset()
Definition: pfs_stat.h:228
PFS_single_stat m_wait_stat
Wait statistics.
Definition: pfs_stat.h:206
Definition: pfs_stat.h:1136
PFS_all_memory_stat m_total
Definition: pfs_stat.h:1138
void end_nested_statement(size_t controlled_local_size_start, size_t controlled_stmt_size_start, size_t total_local_size_start, size_t total_stmt_size_start, size_t *controlled_size, size_t *total_size)
Definition: pfs_stat.h:1162
void end_top_statement(size_t *controlled_size, size_t *total_size)
Definition: pfs_stat.h:1147
PFS_all_memory_stat m_controlled
Definition: pfs_stat.h:1137
void start_nested_statement(size_t *controlled_local_size_start, size_t *controlled_stmt_size_start, size_t *total_local_size_start, size_t *total_stmt_size_start)
Definition: pfs_stat.h:1152
void start_top_statement()
Definition: pfs_stat.h:1142
Single statistic.
Definition: pfs_stat.h:52
void aggregate_counted()
Definition: pfs_stat.h:102
void aggregate_value(ulonglong value)
Definition: pfs_stat.h:106
void aggregate(const PFS_single_stat *stat)
Definition: pfs_stat.h:78
void aggregate_many_value(ulonglong value, ulonglong count)
Definition: pfs_stat.h:117
PFS_single_stat()
Definition: pfs_stat.h:62
ulonglong m_count
Count of values.
Definition: pfs_stat.h:54
ulonglong m_max
Maximum value.
Definition: pfs_stat.h:60
void aggregate_counted(ulonglong count)
Definition: pfs_stat.h:104
void reset()
Definition: pfs_stat.h:69
ulonglong m_min
Minimum value.
Definition: pfs_stat.h:58
bool has_timed_stats() const
Definition: pfs_stat.h:76
void aggregate_no_check(const PFS_single_stat *stat)
Definition: pfs_stat.h:91
ulonglong m_sum
Sum of values.
Definition: pfs_stat.h:56
Statistics for SOCKET I/O.
Definition: pfs_stat.h:839
void sum(PFS_byte_stat *stat)
Definition: pfs_stat.h:860
void aggregate(const PFS_socket_io_stat *stat)
Definition: pfs_stat.h:853
void sum_waits(PFS_single_stat *stat)
Definition: pfs_stat.h:867
PFS_byte_stat m_read
READ statistics.
Definition: pfs_stat.h:841
PFS_byte_stat m_misc
Miscellaneous statistics.
Definition: pfs_stat.h:845
void reset()
Definition: pfs_stat.h:847
PFS_byte_stat m_write
WRITE statistics.
Definition: pfs_stat.h:843
Statistics for SOCKET usage.
Definition: pfs_stat.h:875
void reset()
Reset socket statistics.
Definition: pfs_stat.h:880
PFS_socket_io_stat m_io_stat
Socket timing and byte count statistics per operation.
Definition: pfs_stat.h:877
Statistics for stored program usage.
Definition: pfs_stat.h:340
void aggregate_value(ulonglong value)
Definition: pfs_stat.h:347
PFS_single_stat m_timer1_stat
Definition: pfs_stat.h:341
void reset()
Definition: pfs_stat.h:343
void aggregate(const PFS_stage_stat *stat)
Definition: pfs_stat.h:351
void aggregate_counted()
Definition: pfs_stat.h:345
Statistics for stage usage.
Definition: pfs_stat.h:323
void reset()
Definition: pfs_stat.h:326
void aggregate(const PFS_stage_stat *stat)
Definition: pfs_stat.h:334
PFS_single_stat m_timer1_stat
Definition: pfs_stat.h:324
void aggregate_value(ulonglong value)
Definition: pfs_stat.h:330
void aggregate_counted()
Definition: pfs_stat.h:328
Statistics for statement usage.
Definition: pfs_stat.h:376
ulonglong m_max_total_memory
Definition: pfs_stat.h:403
ulonglong m_sort_range
Definition: pfs_stat.h:392
void aggregate_value(ulonglong value)
Definition: pfs_stat.h:410
ulonglong m_select_range_check
Definition: pfs_stat.h:389
ulonglong m_select_scan
Definition: pfs_stat.h:390
ulonglong m_no_good_index_used
Definition: pfs_stat.h:396
ulonglong m_sort_rows
Definition: pfs_stat.h:393
ulonglong m_lock_time
Definition: pfs_stat.h:381
ulonglong m_created_tmp_disk_tables
Definition: pfs_stat.h:384
ulonglong m_max_controlled_memory
Definition: pfs_stat.h:402
ulonglong m_select_range
Definition: pfs_stat.h:388
void aggregate_counted()
Definition: pfs_stat.h:408
void reset()
Definition: pfs_stat.h:406
ulonglong m_cpu_time
CPU TIME.
Definition: pfs_stat.h:401
void aggregate_memory_size(size_t controlled_size, size_t total_size)
Definition: pfs_stat.h:414
ulonglong m_count_secondary
Definition: pfs_stat.h:404
ulonglong m_sort_scan
Definition: pfs_stat.h:394
ulonglong m_select_full_range_join
Definition: pfs_stat.h:387
ulonglong m_select_full_join
Definition: pfs_stat.h:386
ulonglong m_rows_examined
Definition: pfs_stat.h:383
ulonglong m_warning_count
Definition: pfs_stat.h:379
ulonglong m_rows_affected
Definition: pfs_stat.h:380
PFS_single_stat m_timer1_stat
Definition: pfs_stat.h:377
void aggregate(const PFS_statement_stat *stat)
Definition: pfs_stat.h:423
ulonglong m_created_tmp_tables
Definition: pfs_stat.h:385
ulonglong m_error_count
Definition: pfs_stat.h:378
ulonglong m_no_index_used
Definition: pfs_stat.h:395
ulonglong m_sort_merge_passes
Definition: pfs_stat.h:391
ulonglong m_rows_sent
Definition: pfs_stat.h:382
Single table I/O statistic.
Definition: pfs_stat.h:648
PFS_table_io_stat()
Definition: pfs_stat.h:659
void sum(PFS_single_stat *result)
Definition: pfs_stat.h:679
PFS_single_stat m_insert
INSERT statistics.
Definition: pfs_stat.h:653
bool m_has_data
Definition: pfs_stat.h:649
PFS_single_stat m_fetch
FETCH statistics.
Definition: pfs_stat.h:651
PFS_single_stat m_delete
DELETE statistics.
Definition: pfs_stat.h:657
PFS_single_stat m_update
UPDATE statistics.
Definition: pfs_stat.h:655
void reset()
Definition: pfs_stat.h:661
void aggregate(const PFS_table_io_stat *stat)
Definition: pfs_stat.h:669
Statistics for table locks.
Definition: pfs_stat.h:710
void sum(PFS_single_stat *result)
Definition: pfs_stat.h:730
void reset()
Definition: pfs_stat.h:713
void aggregate(const PFS_table_lock_stat *stat)
Definition: pfs_stat.h:721
PFS_single_stat m_stat[COUNT_PFS_TL_LOCK_TYPE]
Definition: pfs_stat.h:711
Statistics for TABLE usage.
Definition: pfs_stat.h:740
void aggregate_lock(const PFS_table_stat *stat)
Definition: pfs_stat.h:802
void aggregate_io(const PFS_table_stat *stat, uint key_count)
Definition: pfs_stat.h:781
void fast_reset_lock()
Definition: pfs_stat.h:775
PFS_table_lock_stat m_lock_stat
Statistics, per lock type.
Definition: pfs_stat.h:751
void fast_reset_io()
Definition: pfs_stat.h:771
void reset_io()
Reset table I/O statistic.
Definition: pfs_stat.h:754
void reset_lock()
Reset table lock statistic.
Definition: pfs_stat.h:763
PFS_table_io_stat m_index_stat[MAX_INDEXES+1]
Statistics, per index.
Definition: pfs_stat.h:746
void reset()
Reset table statistic.
Definition: pfs_stat.h:766
void fast_reset()
Definition: pfs_stat.h:779
static struct PFS_table_stat g_reset_template
Definition: pfs_stat.h:835
void sum(PFS_single_stat *result, uint key_count)
Definition: pfs_stat.h:830
void sum_io(PFS_single_stat *result, uint key_count)
Definition: pfs_stat.h:811
void aggregate(const PFS_table_stat *stat, uint key_count)
Definition: pfs_stat.h:806
void sum_lock(PFS_single_stat *result)
Definition: pfs_stat.h:828
Statistics for transaction usage.
Definition: pfs_stat.h:459
ulonglong m_release_savepoint_count
Definition: pfs_stat.h:465
ulonglong m_savepoint_count
Definition: pfs_stat.h:463
ulonglong count() const
Definition: pfs_stat.h:473
void reset()
Definition: pfs_stat.h:477
PFS_transaction_stat()
Definition: pfs_stat.h:467
PFS_single_stat m_read_write_stat
Definition: pfs_stat.h:460
PFS_single_stat m_read_only_stat
Definition: pfs_stat.h:461
ulonglong m_rollback_to_savepoint_count
Definition: pfs_stat.h:464
void aggregate(const PFS_transaction_stat *stat)
Definition: pfs_stat.h:485
unsigned int uint
Definition: uca9-dump.cc:75