MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pfs_timer.cc File Reference
#include "my_global.h"
#include "pfs_timer.h"
#include "my_rdtsc.h"
Include dependency graph for pfs_timer.cc:

Go to the source code of this file.

Functions

void init_timers (void)
ulonglong get_timer_raw_value (enum_timer_name timer_name)
ulonglong get_timer_raw_value_and_function (enum_timer_name timer_name, timer_fct_t *fct)
ulonglong get_timer_pico_value (enum_timer_name timer_name)

Variables

enum_timer_name idle_timer = TIMER_NAME_MICROSEC
enum_timer_name wait_timer = TIMER_NAME_CYCLE
enum_timer_name stage_timer = TIMER_NAME_NANOSEC
enum_timer_name statement_timer = TIMER_NAME_NANOSEC
MY_TIMER_INFO pfs_timer_info

Detailed Description

Performance schema timers (implementation).

Definition in file pfs_timer.cc.

Function Documentation

ulonglong get_timer_pico_value ( enum_timer_name  timer_name)

Get a timer value, in pico seconds.

Parameters
timer_namethe timer to use
Returns
timer value, in pico seconds

Definition at line 237 of file pfs_timer.cc.

ulonglong get_timer_raw_value ( enum_timer_name  timer_name)

Get a timer value, in timer units.

Parameters
timer_namethe timer to use
Returns
timer value, in timer units

Definition at line 191 of file pfs_timer.cc.

ulonglong get_timer_raw_value_and_function ( enum_timer_name  timer_name,
timer_fct_t fct 
)

Get a timer value and function, in timer units. This function is useful when code needs to call the same timer several times. The returned timer function can be invoked directly, which avoids having to resolve the timer by name for each call.

Parameters
timer_namethe timer to use
[out]fctthe timer function
Returns
timer value, in timer units

Definition at line 211 of file pfs_timer.cc.

void init_timers ( )

Initialize the timer component.

Definition at line 64 of file pfs_timer.cc.

Here is the caller graph for this function:

Variable Documentation

enum_timer_name idle_timer = TIMER_NAME_MICROSEC

Idle timer. The timer used to measure all idle events.

Definition at line 25 of file pfs_timer.cc.

MY_TIMER_INFO pfs_timer_info

Timer information data. Characteristics about each suported timer.

Definition at line 29 of file pfs_timer.cc.

enum_timer_name stage_timer = TIMER_NAME_NANOSEC

Stage timer. The timer used to measure all stage events.

Definition at line 27 of file pfs_timer.cc.

enum_timer_name statement_timer = TIMER_NAME_NANOSEC

Statement timer. The timer used to measure all statement events.

Definition at line 28 of file pfs_timer.cc.

enum_timer_name wait_timer = TIMER_NAME_CYCLE

Wait timer. The timer used to measure all wait events.

Definition at line 26 of file pfs_timer.cc.