mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
Addresses 1792 refs[t:1792] Add more info to show engine status
git-svn-id: file:///svn/toku/tokudb@14804 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
86de3ebb5b
commit
c8b8e42194
11 changed files with 76 additions and 32 deletions
|
@ -51,9 +51,13 @@ typedef struct __toku_engine_status {
|
|||
u_int64_t cachetable_miss; /* how many cache misses */
|
||||
u_int64_t cachetable_wait_reading; /* how many times get_and_pin waits for a node to be read */
|
||||
u_int64_t cachetable_wait_writing; /* how many times get_and_pin waits for a node to be written */
|
||||
int64_t cachetable_size_current; /* */
|
||||
int64_t cachetable_size_limit; /* */
|
||||
int64_t cachetable_size_writing; /* */
|
||||
u_int64_t puts; /* how many times has a newly created node been put into the cachetable */
|
||||
u_int64_t prefetches; /* how many times has a block been prefetched into the cachetable */
|
||||
u_int64_t maybe_get_and_pins; /* how many times has get_and_pin been called */
|
||||
u_int64_t maybe_get_and_pin_hits; /* how many times has get_and_pin() returned with a node */
|
||||
int64_t cachetable_size_current; /* sum of the sizes of the nodes represented in the cachetable */
|
||||
int64_t cachetable_size_limit; /* the limit to the sum of the node sizes */
|
||||
int64_t cachetable_size_writing; /* the sum of the sizes of the nodes being written */
|
||||
u_int32_t range_locks_max; /* max total number of range locks */
|
||||
u_int32_t range_locks_max_per_db; /* max range locks per dictionary */
|
||||
u_int32_t range_locks_curr; /* total range locks currently in use */
|
||||
|
|
|
@ -51,9 +51,13 @@ typedef struct __toku_engine_status {
|
|||
u_int64_t cachetable_miss; /* how many cache misses */
|
||||
u_int64_t cachetable_wait_reading; /* how many times get_and_pin waits for a node to be read */
|
||||
u_int64_t cachetable_wait_writing; /* how many times get_and_pin waits for a node to be written */
|
||||
int64_t cachetable_size_current; /* */
|
||||
int64_t cachetable_size_limit; /* */
|
||||
int64_t cachetable_size_writing; /* */
|
||||
u_int64_t puts; /* how many times has a newly created node been put into the cachetable */
|
||||
u_int64_t prefetches; /* how many times has a block been prefetched into the cachetable */
|
||||
u_int64_t maybe_get_and_pins; /* how many times has get_and_pin been called */
|
||||
u_int64_t maybe_get_and_pin_hits; /* how many times has get_and_pin() returned with a node */
|
||||
int64_t cachetable_size_current; /* sum of the sizes of the nodes represented in the cachetable */
|
||||
int64_t cachetable_size_limit; /* the limit to the sum of the node sizes */
|
||||
int64_t cachetable_size_writing; /* the sum of the sizes of the nodes being written */
|
||||
u_int32_t range_locks_max; /* max total number of range locks */
|
||||
u_int32_t range_locks_max_per_db; /* max range locks per dictionary */
|
||||
u_int32_t range_locks_curr; /* total range locks currently in use */
|
||||
|
|
|
@ -51,9 +51,13 @@ typedef struct __toku_engine_status {
|
|||
u_int64_t cachetable_miss; /* how many cache misses */
|
||||
u_int64_t cachetable_wait_reading; /* how many times get_and_pin waits for a node to be read */
|
||||
u_int64_t cachetable_wait_writing; /* how many times get_and_pin waits for a node to be written */
|
||||
int64_t cachetable_size_current; /* */
|
||||
int64_t cachetable_size_limit; /* */
|
||||
int64_t cachetable_size_writing; /* */
|
||||
u_int64_t puts; /* how many times has a newly created node been put into the cachetable */
|
||||
u_int64_t prefetches; /* how many times has a block been prefetched into the cachetable */
|
||||
u_int64_t maybe_get_and_pins; /* how many times has get_and_pin been called */
|
||||
u_int64_t maybe_get_and_pin_hits; /* how many times has get_and_pin() returned with a node */
|
||||
int64_t cachetable_size_current; /* sum of the sizes of the nodes represented in the cachetable */
|
||||
int64_t cachetable_size_limit; /* the limit to the sum of the node sizes */
|
||||
int64_t cachetable_size_writing; /* the sum of the sizes of the nodes being written */
|
||||
u_int32_t range_locks_max; /* max total number of range locks */
|
||||
u_int32_t range_locks_max_per_db; /* max range locks per dictionary */
|
||||
u_int32_t range_locks_curr; /* total range locks currently in use */
|
||||
|
|
|
@ -51,9 +51,13 @@ typedef struct __toku_engine_status {
|
|||
u_int64_t cachetable_miss; /* how many cache misses */
|
||||
u_int64_t cachetable_wait_reading; /* how many times get_and_pin waits for a node to be read */
|
||||
u_int64_t cachetable_wait_writing; /* how many times get_and_pin waits for a node to be written */
|
||||
int64_t cachetable_size_current; /* */
|
||||
int64_t cachetable_size_limit; /* */
|
||||
int64_t cachetable_size_writing; /* */
|
||||
u_int64_t puts; /* how many times has a newly created node been put into the cachetable */
|
||||
u_int64_t prefetches; /* how many times has a block been prefetched into the cachetable */
|
||||
u_int64_t maybe_get_and_pins; /* how many times has get_and_pin been called */
|
||||
u_int64_t maybe_get_and_pin_hits; /* how many times has get_and_pin() returned with a node */
|
||||
int64_t cachetable_size_current; /* sum of the sizes of the nodes represented in the cachetable */
|
||||
int64_t cachetable_size_limit; /* the limit to the sum of the node sizes */
|
||||
int64_t cachetable_size_writing; /* the sum of the sizes of the nodes being written */
|
||||
u_int32_t range_locks_max; /* max total number of range locks */
|
||||
u_int32_t range_locks_max_per_db; /* max range locks per dictionary */
|
||||
u_int32_t range_locks_curr; /* total range locks currently in use */
|
||||
|
|
|
@ -51,9 +51,13 @@ typedef struct __toku_engine_status {
|
|||
u_int64_t cachetable_miss; /* how many cache misses */
|
||||
u_int64_t cachetable_wait_reading; /* how many times get_and_pin waits for a node to be read */
|
||||
u_int64_t cachetable_wait_writing; /* how many times get_and_pin waits for a node to be written */
|
||||
int64_t cachetable_size_current; /* */
|
||||
int64_t cachetable_size_limit; /* */
|
||||
int64_t cachetable_size_writing; /* */
|
||||
u_int64_t puts; /* how many times has a newly created node been put into the cachetable */
|
||||
u_int64_t prefetches; /* how many times has a block been prefetched into the cachetable */
|
||||
u_int64_t maybe_get_and_pins; /* how many times has get_and_pin been called */
|
||||
u_int64_t maybe_get_and_pin_hits; /* how many times has get_and_pin() returned with a node */
|
||||
int64_t cachetable_size_current; /* sum of the sizes of the nodes represented in the cachetable */
|
||||
int64_t cachetable_size_limit; /* the limit to the sum of the node sizes */
|
||||
int64_t cachetable_size_writing; /* the sum of the sizes of the nodes being written */
|
||||
u_int32_t range_locks_max; /* max total number of range locks */
|
||||
u_int32_t range_locks_max_per_db; /* max range locks per dictionary */
|
||||
u_int32_t range_locks_curr; /* total range locks currently in use */
|
||||
|
|
|
@ -355,10 +355,13 @@ int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__un
|
|||
printf(" u_int64_t cachetable_miss; /* how many cache misses */ \n");
|
||||
printf(" u_int64_t cachetable_wait_reading; /* how many times get_and_pin waits for a node to be read */ \n");
|
||||
printf(" u_int64_t cachetable_wait_writing; /* how many times get_and_pin waits for a node to be written */ \n");
|
||||
printf(" int64_t cachetable_size_current; /* */ \n");
|
||||
printf(" int64_t cachetable_size_limit; /* */ \n");
|
||||
printf(" int64_t cachetable_size_writing; /* */ \n");
|
||||
|
||||
printf(" u_int64_t puts; /* how many times has a newly created node been put into the cachetable */ \n");
|
||||
printf(" u_int64_t prefetches; /* how many times has a block been prefetched into the cachetable */ \n");
|
||||
printf(" u_int64_t maybe_get_and_pins; /* how many times has get_and_pin been called */ \n");
|
||||
printf(" u_int64_t maybe_get_and_pin_hits; /* how many times has get_and_pin() returned with a node */ \n");
|
||||
printf(" int64_t cachetable_size_current; /* sum of the sizes of the nodes represented in the cachetable */ \n");
|
||||
printf(" int64_t cachetable_size_limit; /* the limit to the sum of the node sizes */ \n");
|
||||
printf(" int64_t cachetable_size_writing; /* the sum of the sizes of the nodes being written */ \n");
|
||||
printf(" u_int32_t range_locks_max; /* max total number of range locks */ \n");
|
||||
printf(" u_int32_t range_locks_max_per_db; /* max range locks per dictionary */ \n");
|
||||
printf(" u_int32_t range_locks_curr; /* total range locks currently in use */ \n");
|
||||
|
|
|
@ -51,9 +51,13 @@ typedef struct __toku_engine_status {
|
|||
u_int64_t cachetable_miss; /* how many cache misses */
|
||||
u_int64_t cachetable_wait_reading; /* how many times get_and_pin waits for a node to be read */
|
||||
u_int64_t cachetable_wait_writing; /* how many times get_and_pin waits for a node to be written */
|
||||
int64_t cachetable_size_current; /* */
|
||||
int64_t cachetable_size_limit; /* */
|
||||
int64_t cachetable_size_writing; /* */
|
||||
u_int64_t puts; /* how many times has a newly created node been put into the cachetable */
|
||||
u_int64_t prefetches; /* how many times has a block been prefetched into the cachetable */
|
||||
u_int64_t maybe_get_and_pins; /* how many times has get_and_pin been called */
|
||||
u_int64_t maybe_get_and_pin_hits; /* how many times has get_and_pin() returned with a node */
|
||||
int64_t cachetable_size_current; /* sum of the sizes of the nodes represented in the cachetable */
|
||||
int64_t cachetable_size_limit; /* the limit to the sum of the node sizes */
|
||||
int64_t cachetable_size_writing; /* the sum of the sizes of the nodes being written */
|
||||
u_int32_t range_locks_max; /* max total number of range locks */
|
||||
u_int32_t range_locks_max_per_db; /* max range locks per dictionary */
|
||||
u_int32_t range_locks_curr; /* total range locks currently in use */
|
||||
|
|
10
include/db.h
10
include/db.h
|
@ -51,9 +51,13 @@ typedef struct __toku_engine_status {
|
|||
u_int64_t cachetable_miss; /* how many cache misses */
|
||||
u_int64_t cachetable_wait_reading; /* how many times get_and_pin waits for a node to be read */
|
||||
u_int64_t cachetable_wait_writing; /* how many times get_and_pin waits for a node to be written */
|
||||
int64_t cachetable_size_current; /* */
|
||||
int64_t cachetable_size_limit; /* */
|
||||
int64_t cachetable_size_writing; /* */
|
||||
u_int64_t puts; /* how many times has a newly created node been put into the cachetable */
|
||||
u_int64_t prefetches; /* how many times has a block been prefetched into the cachetable */
|
||||
u_int64_t maybe_get_and_pins; /* how many times has get_and_pin been called */
|
||||
u_int64_t maybe_get_and_pin_hits; /* how many times has get_and_pin() returned with a node */
|
||||
int64_t cachetable_size_current; /* sum of the sizes of the nodes represented in the cachetable */
|
||||
int64_t cachetable_size_limit; /* the limit to the sum of the node sizes */
|
||||
int64_t cachetable_size_writing; /* the sum of the sizes of the nodes being written */
|
||||
u_int32_t range_locks_max; /* max total number of range locks */
|
||||
u_int32_t range_locks_max_per_db; /* max range locks per dictionary */
|
||||
u_int32_t range_locks_curr; /* total range locks currently in use */
|
||||
|
|
|
@ -47,14 +47,15 @@ static void cachetable_reader(WORKITEM);
|
|||
|
||||
#define TOKU_DO_WAIT_TIME 0
|
||||
|
||||
// these should be in the cachetable object, but we make them global so that gdb can get them easily
|
||||
// these should be in the cachetable object, but we make them file-wide so that gdb can get them easily
|
||||
static u_int64_t cachetable_hit;
|
||||
static u_int64_t cachetable_miss;
|
||||
static u_int64_t cachetable_wait_reading; // how many times does get_and_pin() wait for a node to be read?
|
||||
static u_int64_t cachetable_wait_writing; // how many times does get_and_pin() wait for a node to be written?
|
||||
static u_int64_t cachetable_puts;
|
||||
static u_int64_t cachetable_prefetches;
|
||||
static u_int64_t cachetable_maybe_get_and_pins, cachetable_maybe_get_and_pin_hits;
|
||||
static u_int64_t cachetable_puts; // how many times has a newly created node been put into the cachetable?
|
||||
static u_int64_t cachetable_prefetches; // how many times has a block been prefetched into the cachetable?
|
||||
static u_int64_t cachetable_maybe_get_and_pins; // how many times has get_and_pin been called?
|
||||
static u_int64_t cachetable_maybe_get_and_pin_hits; // how many times has get_and_pin() returned with a node?
|
||||
#if TOKU_DO_WAIT_TIME
|
||||
static u_int64_t cachetable_miss_time;
|
||||
static u_int64_t cachetable_wait_time;
|
||||
|
@ -1952,6 +1953,10 @@ void toku_cachetable_get_status(CACHETABLE ct, CACHETABLE_STATUS s) {
|
|||
s->miss = cachetable_miss;
|
||||
s->wait_reading = cachetable_wait_reading;
|
||||
s->wait_writing = cachetable_wait_writing;
|
||||
s->puts = cachetable_puts;
|
||||
s->prefetches = cachetable_prefetches;
|
||||
s->maybe_get_and_pins = cachetable_maybe_get_and_pins;
|
||||
s->maybe_get_and_pin_hits = cachetable_maybe_get_and_pin_hits;
|
||||
s->size_current = ct->size_current;
|
||||
s->size_limit = ct->size_limit;
|
||||
s->size_writing = ct->size_writing;
|
||||
|
|
|
@ -248,9 +248,13 @@ typedef struct cachetable_status {
|
|||
u_int64_t miss;
|
||||
u_int64_t wait_reading;
|
||||
u_int64_t wait_writing;
|
||||
int64_t size_current; // the sum of the sizes of the pairs in the cachetable
|
||||
int64_t size_limit; // the limit to the sum of the pair sizes
|
||||
int64_t size_writing; // the sum of the sizes of the pairs being written
|
||||
u_int64_t puts; // how many times has a newly created node been put into the cachetable?
|
||||
u_int64_t prefetches; // how many times has a block been prefetched into the cachetable?
|
||||
u_int64_t maybe_get_and_pins; // how many times has get_and_pin been called?
|
||||
u_int64_t maybe_get_and_pin_hits; // how many times has get_and_pin() returned with a node?
|
||||
int64_t size_current; // the sum of the sizes of the nodes represented in the cachetable
|
||||
int64_t size_limit; // the limit to the sum of the node sizes
|
||||
int64_t size_writing; // the sum of the sizes of the nodes being written
|
||||
} CACHETABLE_STATUS_S, *CACHETABLE_STATUS;
|
||||
|
||||
void toku_cachetable_get_status(CACHETABLE ct, CACHETABLE_STATUS s);
|
||||
|
|
|
@ -969,6 +969,10 @@ env_get_engine_status(DB_ENV * env, ENGINE_STATUS * engstat) {
|
|||
engstat->cachetable_miss = ctstat.miss;
|
||||
engstat->cachetable_wait_reading = ctstat.wait_reading;
|
||||
engstat->cachetable_wait_writing = ctstat.wait_writing;
|
||||
engstat->puts = ctstat.puts;
|
||||
engstat->prefetches = ctstat.prefetches;
|
||||
engstat->maybe_get_and_pins = ctstat.maybe_get_and_pins;
|
||||
engstat->maybe_get_and_pin_hits = ctstat.maybe_get_and_pin_hits;
|
||||
engstat->cachetable_size_current = ctstat.size_current;
|
||||
engstat->cachetable_size_limit = ctstat.size_limit;
|
||||
engstat->cachetable_size_writing = ctstat.size_writing;
|
||||
|
|
Loading…
Add table
Reference in a new issue