40#define MICROSEC_TO_PICOSEC 1000000
43#define NANOSEC_TO_PICOSEC 1000
47#error "This build is broken"
80#if defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME)
81#define HAVE_NANOSEC_TIMER
85#elif defined(HAVE_CLOCK_GETTIME) && defined(HAVE_CLOCK_REALTIME)
86#define HAVE_NANOSEC_TIMER
87#elif defined(__APPLE__) && defined(__MACH__)
88#define HAVE_NANOSEC_TIMER
91#ifdef HAVE_NANOSEC_TIMER
93#define USED_TIMER_NAME TIMER_NAME_NANOSEC
94#define USED_TIMER my_timer_nanoseconds
97#define USED_TIMER_NAME TIMER_NAME_MICROSEC
98#define USED_TIMER my_timer_microseconds
static void start(mysql_harness::PluginFuncEnv *env)
Definition: http_auth_backend_plugin.cc:177
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
Multi-platform timer code.
ulonglong my_timer_cycles(void)
A cycle timer.
Definition: my_rdtsc.cc:98
ulonglong my_timer_thread_cpu(void)
A THREAD CPU timer.
Definition: my_rdtsc.cc:319
static int wait(mysql_cond_t *that, mysql_mutex_t *mutex_arg, const char *, unsigned int)
Definition: mysql_cond_v1_native.cc:63
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192
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:36
ulonglong get_wait_timer()
Definition: pfs_timer.h:103
MY_TIMER_INFO pfs_timer_info
Timer information data.
Definition: pfs_timer.cc:40
ulonglong get_thread_cpu_timer()
Definition: pfs_timer.h:111
#define USED_TIMER
Definition: pfs_timer.h:94
ulonglong get_statement_timer()
Definition: pfs_timer.h:107
ulonglong get_stage_timer()
Definition: pfs_timer.h:105
void init_timers()
Initialize the timer component.
Definition: pfs_timer.cc:62
ulonglong get_transaction_timer()
Definition: pfs_timer.h:109
ulonglong get_idle_timer()
Definition: pfs_timer.h:101
Characteristics of all the supported timers.
Definition: my_rdtsc.h:53
A time normalizer.
Definition: pfs_timer.h:119
ulonglong time_to_pico(ulonglong t) const
Convert a time from timer units to pico seconds.
Definition: pfs_timer.h:151
static time_normalizer * get_idle()
Get a time normalizer for the statement timer.
Definition: pfs_timer.cc:151
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:171
ulonglong wait_to_pico(ulonglong wait) const
Convert a wait from timer units to pico seconds.
Definition: pfs_timer.h:142
static time_normalizer * get_stage()
Definition: pfs_timer.cc:159
ulonglong m_bucket_timer[NUMBER_OF_BUCKETS+1]
Histogram bucket timers, expressed in timer unit.
Definition: pfs_timer.h:135
static time_normalizer * get_transaction()
Definition: pfs_timer.cc:167
ulong bucket_index(ulonglong t)
Definition: pfs_timer.cc:190
static time_normalizer * get_wait()
Definition: pfs_timer.cc:155
ulonglong m_factor
Conversion factor from timer values to pico seconds.
Definition: pfs_timer.h:133
ulonglong m_v0
Timer value at server startup.
Definition: pfs_timer.h:131
static time_normalizer * get_statement()
Definition: pfs_timer.cc:163