39#define MICROSEC_TO_PICOSEC 1000000
42#define NANOSEC_TO_PICOSEC 1000
46#error "This build is broken"
79#if defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME)
80#define HAVE_NANOSEC_TIMER
84#elif defined(HAVE_CLOCK_GETTIME) && defined(HAVE_CLOCK_REALTIME)
85#define HAVE_NANOSEC_TIMER
86#elif defined(__APPLE__) && defined(__MACH__)
87#define HAVE_NANOSEC_TIMER
90#ifdef HAVE_NANOSEC_TIMER
92#define USED_TIMER_NAME TIMER_NAME_NANOSEC
93#define USED_TIMER my_timer_nanoseconds
96#define USED_TIMER_NAME TIMER_NAME_MICROSEC
97#define USED_TIMER my_timer_microseconds
static void start(mysql_harness::PluginFuncEnv *env)
Definition: http_auth_backend_plugin.cc:176
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:55
Multi-platform timer code.
ulonglong my_timer_cycles(void)
A cycle timer.
Definition: my_rdtsc.cc:97
ulonglong my_timer_thread_cpu(void)
A THREAD CPU timer.
Definition: my_rdtsc.cc:318
static int wait(mysql_cond_t *that, mysql_mutex_t *mutex_arg, const char *, unsigned int)
Definition: mysql_cond_v1_native.cc:62
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:191
Data types for columns used in the performance schema tables (declarations)
#define NUMBER_OF_BUCKETS
Number of buckets used in histograms.
Definition: pfs_histogram.h:35
ulonglong get_wait_timer()
Definition: pfs_timer.h:102
MY_TIMER_INFO pfs_timer_info
Timer information data.
Definition: pfs_timer.cc:39
ulonglong get_thread_cpu_timer()
Definition: pfs_timer.h:110
#define USED_TIMER
Definition: pfs_timer.h:93
ulonglong get_statement_timer()
Definition: pfs_timer.h:106
ulonglong get_stage_timer()
Definition: pfs_timer.h:104
void init_timers()
Initialize the timer component.
Definition: pfs_timer.cc:61
ulonglong get_transaction_timer()
Definition: pfs_timer.h:108
ulonglong get_idle_timer()
Definition: pfs_timer.h:100
Characteristics of all the supported timers.
Definition: my_rdtsc.h:52
A time normalizer.
Definition: pfs_timer.h:118
ulonglong time_to_pico(ulonglong t) const
Convert a time from timer units to pico seconds.
Definition: pfs_timer.h:150
static time_normalizer * get_idle()
Get a time normalizer for the statement timer.
Definition: pfs_timer.cc:150
void to_pico(ulonglong start, ulonglong end, ulonglong *pico_start, ulonglong *pico_end, ulonglong *pico_wait) const
Convert start / end times from timer units to pico seconds.
Definition: pfs_timer.cc:170
ulonglong wait_to_pico(ulonglong wait) const
Convert a wait from timer units to pico seconds.
Definition: pfs_timer.h:141
static time_normalizer * get_stage()
Definition: pfs_timer.cc:158
ulonglong m_bucket_timer[NUMBER_OF_BUCKETS+1]
Histogram bucket timers, expressed in timer unit.
Definition: pfs_timer.h:134
static time_normalizer * get_transaction()
Definition: pfs_timer.cc:166
ulong bucket_index(ulonglong t)
Definition: pfs_timer.cc:189
static time_normalizer * get_wait()
Definition: pfs_timer.cc:154
ulonglong m_factor
Conversion factor from timer values to pico seconds.
Definition: pfs_timer.h:132
ulonglong m_v0
Timer value at server startup.
Definition: pfs_timer.h:130
static time_normalizer * get_statement()
Definition: pfs_timer.cc:162