diff --git a/buildheader/db.h_4_1 b/buildheader/db.h_4_1 index 6262c5b1254..bef207dd68a 100644 --- a/buildheader/db.h_4_1 +++ b/buildheader/db.h_4_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, diff --git a/buildheader/db.h_4_3 b/buildheader/db.h_4_3 index 5ffe190976f..1fc6f81e2d2 100644 --- a/buildheader/db.h_4_3 +++ b/buildheader/db.h_4_3 @@ -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, diff --git a/buildheader/db.h_4_4 b/buildheader/db.h_4_4 index 493d70f56dc..ab61c4630d8 100644 --- a/buildheader/db.h_4_4 +++ b/buildheader/db.h_4_4 @@ -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, diff --git a/buildheader/db.h_4_5 b/buildheader/db.h_4_5 index 91c8878eaac..6d8e5258b4e 100644 --- a/buildheader/db.h_4_5 +++ b/buildheader/db.h_4_5 @@ -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, diff --git a/buildheader/db.h_4_6 b/buildheader/db.h_4_6 index f043d55e9aa..cc40a19eab7 100644 --- a/buildheader/db.h_4_6 +++ b/buildheader/db.h_4_6 @@ -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, diff --git a/buildheader/make_db_h.c b/buildheader/make_db_h.c index bcdf1afcbc4..ba132637ca8 100644 --- a/buildheader/make_db_h.c +++ b/buildheader/make_db_h.c @@ -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); diff --git a/buildheader/tdb.h b/buildheader/tdb.h index 75c8f1d243f..734851d3b9d 100644 --- a/buildheader/tdb.h +++ b/buildheader/tdb.h @@ -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,