summaryrefslogtreecommitdiff
path: root/storage/perfschema/table_performance_timers.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/perfschema/table_performance_timers.cc')
-rw-r--r--storage/perfschema/table_performance_timers.cc47
1 files changed, 11 insertions, 36 deletions
diff --git a/storage/perfschema/table_performance_timers.cc b/storage/perfschema/table_performance_timers.cc
index 59096267286..8d31c017832 100644
--- a/storage/perfschema/table_performance_timers.cc
+++ b/storage/perfschema/table_performance_timers.cc
@@ -26,35 +26,6 @@
THR_LOCK table_performance_timers::m_table_lock;
-static const TABLE_FIELD_TYPE field_types[]=
-{
- {
- { C_STRING_WITH_LEN("TIMER_NAME") },
- { C_STRING_WITH_LEN("enum(\'CYCLE\',\'NANOSECOND\',\'MICROSECOND\',"
- "\'MILLISECOND\',\'TICK\')") },
- { NULL, 0}
- },
- {
- { C_STRING_WITH_LEN("TIMER_FREQUENCY") },
- { C_STRING_WITH_LEN("bigint(20)") },
- { NULL, 0}
- },
- {
- { C_STRING_WITH_LEN("TIMER_RESOLUTION") },
- { C_STRING_WITH_LEN("bigint(20)") },
- { NULL, 0}
- },
- {
- { C_STRING_WITH_LEN("TIMER_OVERHEAD") },
- { C_STRING_WITH_LEN("bigint(20)") },
- { NULL, 0}
- }
-};
-
-TABLE_FIELD_DEF
-table_performance_timers::m_field_def=
-{ 4, field_types };
-
PFS_engine_table_share
table_performance_timers::m_share=
{
@@ -63,11 +34,15 @@ table_performance_timers::m_share=
&table_performance_timers::create,
NULL, /* write_row */
NULL, /* delete_all_rows */
+ NULL, /* get_row_count */
COUNT_TIMER_NAME, /* records */
sizeof(PFS_simple_index), /* ref length */
&m_table_lock,
- &m_field_def,
- false /* checked */
+ { C_STRING_WITH_LEN("CREATE TABLE performance_timers("
+ "TIMER_NAME ENUM ('CYCLE', 'NANOSECOND', 'MICROSECOND', 'MILLISECOND', 'TICK') not null,"
+ "TIMER_FREQUENCY BIGINT,"
+ "TIMER_RESOLUTION BIGINT,"
+ "TIMER_OVERHEAD BIGINT)") }
};
PFS_engine_table* table_performance_timers::create(void)
@@ -83,23 +58,23 @@ table_performance_timers::table_performance_timers()
index= (int)TIMER_NAME_CYCLE - FIRST_TIMER_NAME;
m_data[index].m_timer_name= TIMER_NAME_CYCLE;
- m_data[index].m_info= pfs_timer_info.cycles;
+ m_data[index].m_info= sys_timer_info.cycles;
index= (int)TIMER_NAME_NANOSEC - FIRST_TIMER_NAME;
m_data[index].m_timer_name= TIMER_NAME_NANOSEC;
- m_data[index].m_info= pfs_timer_info.nanoseconds;
+ m_data[index].m_info= sys_timer_info.nanoseconds;
index= (int)TIMER_NAME_MICROSEC - FIRST_TIMER_NAME;
m_data[index].m_timer_name= TIMER_NAME_MICROSEC;
- m_data[index].m_info= pfs_timer_info.microseconds;
+ m_data[index].m_info= sys_timer_info.microseconds;
index= (int)TIMER_NAME_MILLISEC - FIRST_TIMER_NAME;
m_data[index].m_timer_name= TIMER_NAME_MILLISEC;
- m_data[index].m_info= pfs_timer_info.milliseconds;
+ m_data[index].m_info= sys_timer_info.milliseconds;
index= (int)TIMER_NAME_TICK - FIRST_TIMER_NAME;
m_data[index].m_timer_name= TIMER_NAME_TICK;
- m_data[index].m_info= pfs_timer_info.ticks;
+ m_data[index].m_info= sys_timer_info.ticks;
}
void table_performance_timers::reset_position(void)