Commit ed56f1a3 authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

Addresses #1792 refs[t:1792] Started adding show engine status

git-svn-id: file:///svn/toku/tokudb@14694 c7de825b-a66e-492c-adef-691d508d4ae1
parent ac7ff961
......@@ -42,6 +42,13 @@ typedef struct __toku_db_btree_stat64 {
u_int64_t bt_dsize; /* how big are the keys+values (not counting the lengths) (an estimate, unless flattened) */
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 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 */
} ENGINE_STATUS;
typedef enum {
DB_BTREE=1,
DB_UNKNOWN=5
......@@ -141,7 +148,8 @@ struct __toku_db_env {
int (*set_default_bt_compare) (DB_ENV*,int (*bt_compare) (DB *, const DBT *, const DBT *)) /* Set default (key) comparison function for all DBs in this environment. Required for RECOVERY since you cannot open the DBs manually. */;
int (*set_default_dup_compare) (DB_ENV*,int (*bt_compare) (DB *, const DBT *, const DBT *)) /* Set default (val) comparison function for all DBs in this environment. Required for RECOVERY since you cannot open the DBs manually. */;
void *app_private; /* 32-bit offset=36 size=4, 64=bit offset=72 size=8 */
void* __toku_dummy0[27];
int (*get_engine_status) (DB_ENV*, ENGINE_STATUS*) /* Fill in status struct */;
void* __toku_dummy0[26];
char __toku_dummy1[64];
void *api1_internal; /* 32-bit offset=212 size=4, 64=bit offset=360 size=8 */
void* __toku_dummy2[7];
......
......@@ -42,6 +42,13 @@ typedef struct __toku_db_btree_stat64 {
u_int64_t bt_dsize; /* how big are the keys+values (not counting the lengths) (an estimate, unless flattened) */
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 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 */
} ENGINE_STATUS;
typedef enum {
DB_BTREE=1,
DB_UNKNOWN=5
......@@ -142,7 +149,8 @@ struct __toku_db_env {
int (*checkpointing_end_atomic_operation) (DB_ENV*) /* End a set of operations (that must be atomic as far as checkpoints are concerned). */;
int (*set_default_bt_compare) (DB_ENV*,int (*bt_compare) (DB *, const DBT *, const DBT *)) /* Set default (key) comparison function for all DBs in this environment. Required for RECOVERY since you cannot open the DBs manually. */;
int (*set_default_dup_compare) (DB_ENV*,int (*bt_compare) (DB *, const DBT *, const DBT *)) /* Set default (val) comparison function for all DBs in this environment. Required for RECOVERY since you cannot open the DBs manually. */;
void* __toku_dummy0[2];
int (*get_engine_status) (DB_ENV*, ENGINE_STATUS*) /* Fill in status struct */;
void* __toku_dummy0[1];
void *app_private; /* 32-bit offset=44 size=4, 64=bit offset=88 size=8 */
void* __toku_dummy1[25];
char __toku_dummy2[96];
......
......@@ -42,6 +42,13 @@ typedef struct __toku_db_btree_stat64 {
u_int64_t bt_dsize; /* how big are the keys+values (not counting the lengths) (an estimate, unless flattened) */
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 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 */
} ENGINE_STATUS;
typedef enum {
DB_BTREE=1,
DB_UNKNOWN=5
......@@ -143,7 +150,8 @@ struct __toku_db_env {
int (*checkpointing_end_atomic_operation) (DB_ENV*) /* End a set of operations (that must be atomic as far as checkpoints are concerned). */;
int (*set_default_bt_compare) (DB_ENV*,int (*bt_compare) (DB *, const DBT *, const DBT *)) /* Set default (key) comparison function for all DBs in this environment. Required for RECOVERY since you cannot open the DBs manually. */;
int (*set_default_dup_compare) (DB_ENV*,int (*bt_compare) (DB *, const DBT *, const DBT *)) /* Set default (val) comparison function for all DBs in this environment. Required for RECOVERY since you cannot open the DBs manually. */;
void* __toku_dummy0[2];
int (*get_engine_status) (DB_ENV*, ENGINE_STATUS*) /* Fill in status struct */;
void* __toku_dummy0[1];
void *app_private; /* 32-bit offset=44 size=4, 64=bit offset=88 size=8 */
void* __toku_dummy1[40];
char __toku_dummy2[128];
......
......@@ -42,6 +42,13 @@ typedef struct __toku_db_btree_stat64 {
u_int64_t bt_dsize; /* how big are the keys+values (not counting the lengths) (an estimate, unless flattened) */
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 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 */
} ENGINE_STATUS;
typedef enum {
DB_BTREE=1,
DB_UNKNOWN=5
......@@ -143,7 +150,8 @@ struct __toku_db_env {
int (*checkpointing_end_atomic_operation) (DB_ENV*) /* End a set of operations (that must be atomic as far as checkpoints are concerned). */;
int (*set_default_bt_compare) (DB_ENV*,int (*bt_compare) (DB *, const DBT *, const DBT *)) /* Set default (key) comparison function for all DBs in this environment. Required for RECOVERY since you cannot open the DBs manually. */;
int (*set_default_dup_compare) (DB_ENV*,int (*bt_compare) (DB *, const DBT *, const DBT *)) /* Set default (val) comparison function for all DBs in this environment. Required for RECOVERY since you cannot open the DBs manually. */;
void* __toku_dummy0[4];
int (*get_engine_status) (DB_ENV*, ENGINE_STATUS*) /* Fill in status struct */;
void* __toku_dummy0[3];
void *app_private; /* 32-bit offset=52 size=4, 64=bit offset=104 size=8 */
void* __toku_dummy1[38];
char __toku_dummy2[128];
......
......@@ -42,6 +42,13 @@ typedef struct __toku_db_btree_stat64 {
u_int64_t bt_dsize; /* how big are the keys+values (not counting the lengths) (an estimate, unless flattened) */
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 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 */
} ENGINE_STATUS;
typedef enum {
DB_BTREE=1,
DB_UNKNOWN=5
......@@ -145,7 +152,8 @@ struct __toku_db_env {
int (*checkpointing_end_atomic_operation) (DB_ENV*) /* End a set of operations (that must be atomic as far as checkpoints are concerned). */;
int (*set_default_bt_compare) (DB_ENV*,int (*bt_compare) (DB *, const DBT *, const DBT *)) /* Set default (key) comparison function for all DBs in this environment. Required for RECOVERY since you cannot open the DBs manually. */;
int (*set_default_dup_compare) (DB_ENV*,int (*bt_compare) (DB *, const DBT *, const DBT *)) /* Set default (val) comparison function for all DBs in this environment. Required for RECOVERY since you cannot open the DBs manually. */;
void* __toku_dummy0[4];
int (*get_engine_status) (DB_ENV*, ENGINE_STATUS*) /* Fill in status struct */;
void* __toku_dummy0[3];
void *app_private; /* 32-bit offset=52 size=4, 64=bit offset=104 size=8 */
void* __toku_dummy1[39];
char __toku_dummy2[144];
......
......@@ -344,6 +344,19 @@ int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__un
printf(" u_int64_t bt_fsize; /* how big is the underlying file */\n");
printf("} DB_BTREE_STAT64;\n");
//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 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("} ENGINE_STATUS;\n");
print_dbtype();
// print_db_notices();
print_defines();
......@@ -364,6 +377,7 @@ int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__un
"int (*checkpointing_end_atomic_operation) (DB_ENV*) /* End a set of operations (that must be atomic as far as checkpoints are concerned). */",
"int (*set_default_bt_compare) (DB_ENV*,int (*bt_compare) (DB *, const DBT *, const DBT *)) /* Set default (key) comparison function for all DBs in this environment. Required for RECOVERY since you cannot open the DBs manually. */",
"int (*set_default_dup_compare) (DB_ENV*,int (*bt_compare) (DB *, const DBT *, const DBT *)) /* Set default (val) comparison function for all DBs in this environment. Required for RECOVERY since you cannot open the DBs manually. */",
"int (*get_engine_status) (DB_ENV*, ENGINE_STATUS*) /* Fill in status struct */",
NULL};
print_struct("db_env", 1, db_env_fields32, db_env_fields64, sizeof(db_env_fields32)/sizeof(db_env_fields32[0]), extra);
}
......
......@@ -42,6 +42,13 @@ typedef struct __toku_db_btree_stat64 {
u_int64_t bt_dsize; /* how big are the keys+values (not counting the lengths) (an estimate, unless flattened) */
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 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 */
} ENGINE_STATUS;
typedef enum {
DB_BTREE=1,
DB_UNKNOWN=5
......@@ -145,6 +152,7 @@ struct __toku_db_env {
int (*checkpointing_end_atomic_operation) (DB_ENV*) /* End a set of operations (that must be atomic as far as checkpoints are concerned). */;
int (*set_default_bt_compare) (DB_ENV*,int (*bt_compare) (DB *, const DBT *, const DBT *)) /* Set default (key) comparison function for all DBs in this environment. Required for RECOVERY since you cannot open the DBs manually. */;
int (*set_default_dup_compare) (DB_ENV*,int (*bt_compare) (DB *, const DBT *, const DBT *)) /* Set default (val) comparison function for all DBs in this environment. Required for RECOVERY since you cannot open the DBs manually. */;
int (*get_engine_status) (DB_ENV*, ENGINE_STATUS*) /* Fill in status struct */;
void *app_private;
void *api1_internal;
int (*close) (DB_ENV *, u_int32_t);
......
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