Adding explaination for ob stat and event.

This commit is contained in:
rolandqi
2024-02-04 09:47:00 +00:00
committed by ob-robot
parent 6e55905bf9
commit 8898fe4c19
3 changed files with 36 additions and 3 deletions

View File

@ -11,8 +11,18 @@
*/
#ifdef LATCH_DEF
// NOTICE: No need to add wait event when adding latch
// NOTICE: do not reuse latch id or rename latch!
/**
* LATCH_DEF(def, id, name, policy, max_spin_cnt, max_yield_cnt, enable)
* @param def Name of this latch
* @param id Identifier of an latch ATTENTION: please add id placeholder on master.
* @param name Name for this latch. Display on virtual table v$event_name
* @param policy LATCH_READ_PREFER and LATCH_FIFO
* @param max_spin_cnt for mutex, spin several times to try to get lock before actually perform an mutex lock.
* @param max_yield_cnt times of call to sched_yield() instead of perform an mutex lock.
* @param enable Indicate whether this latch is enabled. Marked it false it you merely need it as an placeholder.
* NOTICE: No need to add wait event when adding latch
* NOTICE: do not reuse latch id or rename latch!
*/
LATCH_DEF(LATCH_WAIT_QUEUE_LOCK, 0, "latch wait queue lock", LATCH_FIFO, 2000, 0, true)
LATCH_DEF(DEFAULT_SPIN_LOCK, 1, "default spin lock", LATCH_FIFO, 2000, 0, true)
LATCH_DEF(DEFAULT_SPIN_RWLOCK, 2, "default spin rwlock", LATCH_FIFO, 2000, 0, true)

View File

@ -11,6 +11,18 @@
*/
#ifdef STAT_EVENT_ADD_DEF
/**
* STAT_EVENT_ADD_DEF(def, name, stat_class, stat_id, summary_in_session, can_visible, enable)
* STAT_EVENT_SET_DEF(def, name, stat_class, stat_id, summary_in_session, can_visible, enable)
* @param def name of this stat
* @param name Name of this stat. Display on v$statname.
* @param stat_class Every stats belongs to a class on deps/oblib/src/lib/statistic_event/ob_stat_class.h
* @param stat_id Identifier of an stat ATTENTION: please add id placeholder on master.
* @param summary_in_session Stat recorded for user session process mark this flag true.
* @param can_visible Indicate whether this stat can be queried on gv$sysstat and gv$sesstat.
* @param enable Indicate whether this stat is enabled. Marked it false it you merely need it as an placeholder.
*/
// NETWORK
STAT_EVENT_ADD_DEF(RPC_PACKET_IN, "rpc packet in", ObStatClassIds::NETWORK, 10000, true, true, true)
STAT_EVENT_ADD_DEF(RPC_PACKET_IN_BYTES, "rpc packet in bytes", ObStatClassIds::NETWORK, 10001, false, true, true)

View File

@ -11,7 +11,18 @@
*/
#ifdef WAIT_EVENT_DEF
// symbol, id, name, param1, param2, param3, ObWaitClassIds::wait_class, is_phy, enable
/**
* WAIT_EVENT_DEF(def, id, name, param1, param2, param3, wait_class, is_phy, enable)
* @param def Name of this wait event
* @param id Identifier of an wait event. ATTENTION: please add id placeholder on master.
* @param name Name for this wait event. Display on virtual table v$event_name
* @param param1 Additional showing param 1. Display on gv$active_session_history and gv$session_wait
* @param prarm2 Additional showing param 2. Display on gv$active_session_history and gv$session_wait
* @param param3 Additional showing param 3. Display on gv$active_session_history and gv$session_wait
* @param class Every wait event belongs to a class of wait event on deps/oblib/src/lib/wait_event/ob_wait_class.h
* @param is_phy Indicate whether this wait event can be nested. true for most cases.
* @param enable Means whether this wait event is enabled. Marked it false it you merely need it as an placeholder.
*/
// USER_IO & SYSTEM_IO
WAIT_EVENT_DEF(NULL_EVENT, 10000, "", "", "", "", OTHER, true, true)
WAIT_EVENT_DEF(DB_FILE_DATA_READ, 10001, "db file data read", "fd", "offset", "size", USER_IO, true, true)