53 inline void reset(
void)
61 inline bool has_timed_stats()
const
72 if (unlikely(m_max < stat->
m_max))
76 inline void aggregate_counted()
81 inline void aggregate_counted(ulonglong count)
86 inline void aggregate_value(ulonglong value)
90 if (unlikely(
m_min > value))
92 if (unlikely(
m_max < value))
106 PFS_single_stat::aggregate(stat);
111 inline void aggregate(ulonglong wait, ulonglong bytes)
113 aggregate_value(wait);
120 PFS_single_stat::aggregate(stat);
124 inline void aggregate_counted()
126 PFS_single_stat::aggregate_counted();
130 inline void aggregate_counted(ulonglong bytes)
132 PFS_single_stat::aggregate_counted();
141 inline void reset(
void)
143 PFS_single_stat::reset();
165 inline void reset(
void)
195 inline void reset(
void)
226 inline void reset(
void)
244 inline void reset(
void)
300 inline void reset(
void)
301 { m_timer1_stat.reset(); }
303 inline void aggregate_counted()
304 { m_timer1_stat.aggregate_counted(); }
306 inline void aggregate_value(ulonglong value)
307 { m_timer1_stat.aggregate_value(value); }
310 { m_timer1_stat.aggregate(& stat->m_timer1_stat); }
317 ulonglong m_error_count;
318 ulonglong m_warning_count;
319 ulonglong m_rows_affected;
320 ulonglong m_lock_time;
321 ulonglong m_rows_sent;
322 ulonglong m_rows_examined;
323 ulonglong m_created_tmp_disk_tables;
324 ulonglong m_created_tmp_tables;
325 ulonglong m_select_full_join;
326 ulonglong m_select_full_range_join;
327 ulonglong m_select_range;
328 ulonglong m_select_range_check;
329 ulonglong m_select_scan;
330 ulonglong m_sort_merge_passes;
331 ulonglong m_sort_range;
332 ulonglong m_sort_rows;
333 ulonglong m_sort_scan;
334 ulonglong m_no_index_used;
335 ulonglong m_no_good_index_used;
345 m_created_tmp_disk_tables= 0;
346 m_created_tmp_tables= 0;
347 m_select_full_join= 0;
348 m_select_full_range_join= 0;
350 m_select_range_check= 0;
352 m_sort_merge_passes= 0;
357 m_no_good_index_used= 0;
360 inline void reset(
void)
362 m_timer1_stat.reset();
369 m_created_tmp_disk_tables= 0;
370 m_created_tmp_tables= 0;
371 m_select_full_join= 0;
372 m_select_full_range_join= 0;
374 m_select_range_check= 0;
376 m_sort_merge_passes= 0;
381 m_no_good_index_used= 0;
384 inline void aggregate_counted()
385 { m_timer1_stat.aggregate_counted(); }
387 inline void aggregate_value(ulonglong value)
388 { m_timer1_stat.aggregate_value(value); }
392 m_timer1_stat.aggregate(& stat->m_timer1_stat);
394 m_error_count+= stat->m_error_count;
395 m_warning_count+= stat->m_warning_count;
396 m_rows_affected+= stat->m_rows_affected;
397 m_lock_time+= stat->m_lock_time;
398 m_rows_sent+= stat->m_rows_sent;
399 m_rows_examined+= stat->m_rows_examined;
400 m_created_tmp_disk_tables+= stat->m_created_tmp_disk_tables;
401 m_created_tmp_tables+= stat->m_created_tmp_tables;
402 m_select_full_join+= stat->m_select_full_join;
403 m_select_full_range_join+= stat->m_select_full_range_join;
404 m_select_range+= stat->m_select_range;
405 m_select_range_check+= stat->m_select_range_check;
406 m_select_scan+= stat->m_select_scan;
407 m_sort_merge_passes+= stat->m_sort_merge_passes;
408 m_sort_range+= stat->m_sort_range;
409 m_sort_rows+= stat->m_sort_rows;
410 m_sort_scan+= stat->m_sort_scan;
411 m_no_index_used+= stat->m_no_index_used;
412 m_no_good_index_used+= stat->m_no_good_index_used;
434 inline void reset(
void)
445 if (stat->m_has_data)
467 enum PFS_TL_LOCK_TYPE
471 PFS_TL_READ_WITH_SHARED_LOCKS= 1,
472 PFS_TL_READ_HIGH_PRIORITY= 2,
473 PFS_TL_READ_NO_INSERT= 3,
474 PFS_TL_WRITE_ALLOW_WRITE= 4,
475 PFS_TL_WRITE_CONCURRENT_INSERT= 5,
476 PFS_TL_WRITE_DELAYED= 6,
477 PFS_TL_WRITE_LOW_PRIORITY= 7,
481 PFS_TL_READ_EXTERNAL= 9,
482 PFS_TL_WRITE_EXTERNAL= 10
485 #define COUNT_PFS_TL_LOCK_TYPE 11
492 inline void reset(
void)
496 for ( ; pfs < pfs_last ; pfs++)
505 for ( ; pfs < pfs_last ; pfs++, pfs_from++)
506 pfs->aggregate(pfs_from);
513 for ( ; pfs < pfs_last ; pfs++)
514 result->aggregate(pfs);
538 for ( ; stat < stat_last ; stat++)
555 inline void fast_reset_io(
void)
560 inline void fast_reset_lock(
void)
565 inline void fast_reset(
void)
567 memcpy(
this, & g_reset_template,
sizeof(*
this));
570 inline void aggregate_io(
const PFS_table_stat *stat, uint key_count)
576 DBUG_ASSERT(key_count <= MAX_INDEXES);
580 to_stat_last= to_stat + key_count;
582 for ( ; to_stat < to_stat_last ; from_stat++, to_stat++)
583 to_stat->aggregate(from_stat);
588 to_stat->aggregate(from_stat);
598 aggregate_io(stat, key_count);
599 aggregate_lock(stat);
607 DBUG_ASSERT(key_count <= MAX_INDEXES);
611 stat_last= stat + key_count;
612 for ( ; stat < stat_last ; stat++)
626 sum_io(result, key_count);
643 inline void reset(
void)
690 : m_current_connections(0),
691 m_total_connections(0)
694 ulonglong m_current_connections;
695 ulonglong m_total_connections;
697 inline void aggregate_active(ulonglong active)
699 m_current_connections+= active;
700 m_total_connections+= active;
703 inline void aggregate_disconnected(ulonglong disconnected)
705 m_total_connections+= disconnected;