25.6 Performance Schema Instrument Naming Conventions

An instrument name consists of a sequence of elements separated by ''/'' characters. Example names:

 wait/io/file/myisam/log
 wait/io/file/mysys/charset
 wait/lock/table/sql/handler
 wait/synch/cond/mysys/COND_alarm
 wait/synch/cond/sql/BINLOG::update_cond
 wait/synch/mutex/mysys/BITMAP_mutex
 wait/synch/mutex/sql/LOCK_delete
 wait/synch/rwlock/sql/Query_cache_query::lock
 stage/sql/closing tables
 stage/sql/Sorting result
 statement/com/Execute
 statement/com/Query
 statement/sql/create_table
 statement/sql/lock_tables

The instrument name space has a tree-like structure. The elements of an instrument name from left to right provide a progression from more general to more specific. The number of elements a name has depends on the type of instrument.

The interpretation of a given element in a name depends on the elements to the left of it. For example, 'myisam' appears in both of the following names, but 'myisam' in the first name is related to file I/O, whereas in the second it is related to a synchronization instrument:

 wait/io/file/myisam/log
 wait/synch/cond/myisam/MI_SORT_INFO::cond

Instrument names consist of a prefix with a structure defined by the Performance Schema implementation and a suffix defined by the developer implementing the instrument code. The top-level element of an instrument prefix indicates the type of instrument. This element also determines which event timer in the 'setup_timers' table applies to the instrument. For the prefix part of instrument names, the top level indicates the type of instrument.

The suffix part of instrument names comes from the code for the instruments themselves. Suffixes may include levels such as these:

Top-Level Instrument Elements

Idle Instrument Elements

The 'idle' instrument is used for idle events, which The Performance Schema generates as discussed in the description of the 'socket_instances.STATE' column in *note performance-schema-socket-instances-table::.

Memory Instrument Elements

Most memory instrumentation is disabled by default, and can be enabled or disabled at startup, or dynamically at runtime by updating the 'ENABLED' column of the relevant instruments in the *note 'setup_instruments': performance-schema-setup-instruments-table. table. Memory instruments have names of the form 'memory/CODE_AREA/INSTRUMENT_NAME' where CODE_AREA is a value such as 'sql' or 'myisam', and INSTRUMENT_NAME is the instrument detail.

Instruments named with the prefix 'memory/performance_schema/' expose how much memory is allocated for internal buffers in the Performance Schema. The 'memory/performance_schema/' instruments are built in, always enabled, and cannot be disabled at startup or runtime. Built-in memory instruments are displayed only in the note 'memory_summary_global_by_event_name': performance-schema-memory-summary-tables. table. For more information, see note performance-schema-memory-model::.

Stage Instrument Elements

Stage instruments have names of the form 'stage/CODE_AREA/STAGE_NAME', where CODE_AREA is a value such as 'sql' or 'myisam', and STAGE_NAME indicates the stage of statement processing, such as 'Sorting result' or 'Sending data'. Stages correspond to the thread states displayed by note 'SHOW PROCESSLIST': show-processlist. or that are visible in the Information Schema note 'PROCESSLIST': information-schema-processlist-table. table.

Statement Instrument Elements

Wait Instrument Elements

 File: manual.info.tmp, Node: performance-schema-status-monitoring, Next: performance-schema-atom-molecule-events, Prev: performance-schema-instrument-naming, Up: performance-schema