Commit 192322cc authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

Addresses #1792 refs[t:1792] Added more content to show engine status

git-svn-id: file:///svn/toku/tokudb@14731 c7de825b-a66e-492c-adef-691d508d4ae1
parent 7a4a3de9
......@@ -43,11 +43,17 @@ typedef struct __toku_db_btree_stat64 {
u_int64_t bt_fsize; /* how big is the underlying file */
} DB_BTREE_STAT64;
typedef struct __toku_engine_status {
int ydb_lock_held; /* is some thread holding the ydb lock? */
u_int32_t ydb_lock_ctr; /* how many times has ydb lock been taken/released */
u_int32_t checkpoint_period; /* delay between automatic checkpoints */
u_int64_t checkpoint_footprint; /* state of checkpoint procedure */
struct timeval tbegin; /* time of last checkpoint begin */
struct timeval tend; /* time of last checkpoint end */
u_int32_t checkpoint_footprint; /* state of checkpoint procedure */
u_int32_t cachetable_lock_ctr; /* how many times has cachetable lock been taken/released */
u_int64_t cachetable_hit; /* how many cache hits */
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; /* */
} ENGINE_STATUS;
typedef enum {
DB_BTREE=1,
......
......@@ -43,11 +43,17 @@ typedef struct __toku_db_btree_stat64 {
u_int64_t bt_fsize; /* how big is the underlying file */
} DB_BTREE_STAT64;
typedef struct __toku_engine_status {
int ydb_lock_held; /* is some thread holding the ydb lock? */
u_int32_t ydb_lock_ctr; /* how many times has ydb lock been taken/released */
u_int32_t checkpoint_period; /* delay between automatic checkpoints */
u_int64_t checkpoint_footprint; /* state of checkpoint procedure */
struct timeval tbegin; /* time of last checkpoint begin */
struct timeval tend; /* time of last checkpoint end */
u_int32_t checkpoint_footprint; /* state of checkpoint procedure */
u_int32_t cachetable_lock_ctr; /* how many times has cachetable lock been taken/released */
u_int64_t cachetable_hit; /* how many cache hits */
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; /* */
} ENGINE_STATUS;
typedef enum {
DB_BTREE=1,
......
......@@ -43,11 +43,17 @@ typedef struct __toku_db_btree_stat64 {
u_int64_t bt_fsize; /* how big is the underlying file */
} DB_BTREE_STAT64;
typedef struct __toku_engine_status {
int ydb_lock_held; /* is some thread holding the ydb lock? */
u_int32_t ydb_lock_ctr; /* how many times has ydb lock been taken/released */
u_int32_t checkpoint_period; /* delay between automatic checkpoints */
u_int64_t checkpoint_footprint; /* state of checkpoint procedure */
struct timeval tbegin; /* time of last checkpoint begin */
struct timeval tend; /* time of last checkpoint end */
u_int32_t checkpoint_footprint; /* state of checkpoint procedure */
u_int32_t cachetable_lock_ctr; /* how many times has cachetable lock been taken/released */
u_int64_t cachetable_hit; /* how many cache hits */
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; /* */
} ENGINE_STATUS;
typedef enum {
DB_BTREE=1,
......
......@@ -43,11 +43,17 @@ typedef struct __toku_db_btree_stat64 {
u_int64_t bt_fsize; /* how big is the underlying file */
} DB_BTREE_STAT64;
typedef struct __toku_engine_status {
int ydb_lock_held; /* is some thread holding the ydb lock? */
u_int32_t ydb_lock_ctr; /* how many times has ydb lock been taken/released */
u_int32_t checkpoint_period; /* delay between automatic checkpoints */
u_int64_t checkpoint_footprint; /* state of checkpoint procedure */
struct timeval tbegin; /* time of last checkpoint begin */
struct timeval tend; /* time of last checkpoint end */
u_int32_t checkpoint_footprint; /* state of checkpoint procedure */
u_int32_t cachetable_lock_ctr; /* how many times has cachetable lock been taken/released */
u_int64_t cachetable_hit; /* how many cache hits */
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; /* */
} ENGINE_STATUS;
typedef enum {
DB_BTREE=1,
......
......@@ -43,11 +43,17 @@ typedef struct __toku_db_btree_stat64 {
u_int64_t bt_fsize; /* how big is the underlying file */
} DB_BTREE_STAT64;
typedef struct __toku_engine_status {
int ydb_lock_held; /* is some thread holding the ydb lock? */
u_int32_t ydb_lock_ctr; /* how many times has ydb lock been taken/released */
u_int32_t checkpoint_period; /* delay between automatic checkpoints */
u_int64_t checkpoint_footprint; /* state of checkpoint procedure */
struct timeval tbegin; /* time of last checkpoint begin */
struct timeval tend; /* time of last checkpoint end */
u_int32_t checkpoint_footprint; /* state of checkpoint procedure */
u_int32_t cachetable_lock_ctr; /* how many times has cachetable lock been taken/released */
u_int64_t cachetable_hit; /* how many cache hits */
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; /* */
} ENGINE_STATUS;
typedef enum {
DB_BTREE=1,
......
......@@ -347,13 +347,23 @@ int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__un
//engine status info
printf("typedef struct __toku_engine_status {\n");
printf(" int ydb_lock_held; /* is some thread holding the ydb lock? */ \n");
printf(" u_int32_t ydb_lock_ctr; /* how many times has ydb lock been taken/released */ \n");
printf(" u_int32_t checkpoint_period; /* delay between automatic checkpoints */ \n");
printf(" u_int64_t checkpoint_footprint; /* state of checkpoint procedure */ \n");
printf(" struct timeval tbegin; /* time of last checkpoint begin */ \n");
printf(" struct timeval tend; /* time of last checkpoint end */ \n");
// printf(" DB_LSN lsn_of_last_checkpoint_begin; \n");
// printf(" DB_LSN lsn_of_last_checkpoint_end; \n");
printf(" u_int32_t checkpoint_footprint; /* state of checkpoint procedure */ \n");
printf(" u_int32_t cachetable_lock_ctr; /* how many times has cachetable lock been taken/released */ \n");
printf(" u_int64_t cachetable_hit; /* how many cache hits */ \n");
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(" struct timeval checkpoint_tbegin; /* time of last checkpoint begin */ \n");
// printf(" struct timeval checkpoint_tend; /* time of last checkpoint end */ \n");
// printf(" DB_LSN lsn_of_last_checkpoint_begin; \n");
// printf(" DB_LSN lsn_of_last_checkpoint_end; \n");
printf("} ENGINE_STATUS;\n");
......@@ -386,7 +396,10 @@ int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__un
print_struct("db_key_range", 0, db_key_range_fields32, db_key_range_fields64, sizeof(db_key_range_fields32)/sizeof(db_key_range_fields32[0]), 0);
assert(sizeof(db_lsn_fields32)==sizeof(db_lsn_fields64));
print_struct("db_lsn", 0, db_lsn_fields32, db_lsn_fields64, sizeof(db_lsn_fields32)/sizeof(db_lsn_fields32[0]), 0);
{
//const char *extra[] = {"u_int64_t lsn", NULL};
print_struct("db_lsn", 0, db_lsn_fields32, db_lsn_fields64, sizeof(db_lsn_fields32)/sizeof(db_lsn_fields32[0]), 0);
}
assert(sizeof(dbt_fields32)==sizeof(dbt_fields64));
print_struct("dbt", 0, dbt_fields32, dbt_fields64, sizeof(dbt_fields32)/sizeof(dbt_fields32[0]), 0);
......
......@@ -43,11 +43,17 @@ typedef struct __toku_db_btree_stat64 {
u_int64_t bt_fsize; /* how big is the underlying file */
} DB_BTREE_STAT64;
typedef struct __toku_engine_status {
int ydb_lock_held; /* is some thread holding the ydb lock? */
u_int32_t ydb_lock_ctr; /* how many times has ydb lock been taken/released */
u_int32_t checkpoint_period; /* delay between automatic checkpoints */
u_int64_t checkpoint_footprint; /* state of checkpoint procedure */
struct timeval tbegin; /* time of last checkpoint begin */
struct timeval tend; /* time of last checkpoint end */
u_int32_t checkpoint_footprint; /* state of checkpoint procedure */
u_int32_t cachetable_lock_ctr; /* how many times has cachetable lock been taken/released */
u_int64_t cachetable_hit; /* how many cache hits */
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; /* */
} ENGINE_STATUS;
typedef enum {
DB_BTREE=1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment