Commit 0375f255 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

[t:3988] added flush status

git-svn-id: file:///svn/toku/tokudb@36862 c7de825b-a66e-492c-adef-691d508d4ae1
parent 95cac476
......@@ -105,6 +105,7 @@ typedef struct __toku_engine_status {
u_int64_t cachetable_wait_writing; /* how many times get_and_pin waits for a node to be written */
u_int64_t cachetable_wait_checkpoint; /* how many times get_and_pin waits for a node to be written for a checkpoint*/
u_int64_t cachetable_evictions; /* how many cache table blocks are evicted */
u_int64_t cleaner_executions; /* how many times the loop in cleaner_thread has executed */
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 maybe_get_and_pin(_clean) been called */
......@@ -181,6 +182,16 @@ typedef struct __toku_engine_status {
uint64_t cleaner_max_buffer_workdone; /* max workdone value of any message buffer flushed by cleaner thread */
uint64_t cleaner_min_buffer_workdone; /* min workdone value of any message buffer flushed by cleaner thread */
uint64_t cleaner_total_buffer_workdone; /* total workdone value of message buffers flushed by cleaner thread */
uint64_t flush_total; /* total number of flushes done by flusher threads or cleaner threads */
uint64_t flush_in_memory; /* number of in memory flushes */
uint64_t flush_needed_io; /* number of flushes that had to read a child (or part) off disk */
uint64_t flush_cascades; /* number of flushes that triggered another flush in the child */
uint64_t flush_cascades_1; /* number of flushes that triggered 1 cascading flush */
uint64_t flush_cascades_2; /* number of flushes that triggered 2 cascading flushes */
uint64_t flush_cascades_3; /* number of flushes that triggered 3 cascading flushes */
uint64_t flush_cascades_4; /* number of flushes that triggered 4 cascading flushes */
uint64_t flush_cascades_5; /* number of flushes that triggered 5 cascading flushes */
uint64_t flush_cascades_gt_5; /* number of flushes that triggered more than 5 cascading flushes */
u_int64_t point_queries; /* ydb point queries */
u_int64_t sequential_queries; /* ydb sequential queries */
u_int64_t le_max_committed_xr; /* max committed transaction records in any packed le */
......
......@@ -105,6 +105,7 @@ typedef struct __toku_engine_status {
u_int64_t cachetable_wait_writing; /* how many times get_and_pin waits for a node to be written */
u_int64_t cachetable_wait_checkpoint; /* how many times get_and_pin waits for a node to be written for a checkpoint*/
u_int64_t cachetable_evictions; /* how many cache table blocks are evicted */
u_int64_t cleaner_executions; /* how many times the loop in cleaner_thread has executed */
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 maybe_get_and_pin(_clean) been called */
......@@ -181,6 +182,16 @@ typedef struct __toku_engine_status {
uint64_t cleaner_max_buffer_workdone; /* max workdone value of any message buffer flushed by cleaner thread */
uint64_t cleaner_min_buffer_workdone; /* min workdone value of any message buffer flushed by cleaner thread */
uint64_t cleaner_total_buffer_workdone; /* total workdone value of message buffers flushed by cleaner thread */
uint64_t flush_total; /* total number of flushes done by flusher threads or cleaner threads */
uint64_t flush_in_memory; /* number of in memory flushes */
uint64_t flush_needed_io; /* number of flushes that had to read a child (or part) off disk */
uint64_t flush_cascades; /* number of flushes that triggered another flush in the child */
uint64_t flush_cascades_1; /* number of flushes that triggered 1 cascading flush */
uint64_t flush_cascades_2; /* number of flushes that triggered 2 cascading flushes */
uint64_t flush_cascades_3; /* number of flushes that triggered 3 cascading flushes */
uint64_t flush_cascades_4; /* number of flushes that triggered 4 cascading flushes */
uint64_t flush_cascades_5; /* number of flushes that triggered 5 cascading flushes */
uint64_t flush_cascades_gt_5; /* number of flushes that triggered more than 5 cascading flushes */
u_int64_t point_queries; /* ydb point queries */
u_int64_t sequential_queries; /* ydb sequential queries */
u_int64_t le_max_committed_xr; /* max committed transaction records in any packed le */
......
......@@ -105,6 +105,7 @@ typedef struct __toku_engine_status {
u_int64_t cachetable_wait_writing; /* how many times get_and_pin waits for a node to be written */
u_int64_t cachetable_wait_checkpoint; /* how many times get_and_pin waits for a node to be written for a checkpoint*/
u_int64_t cachetable_evictions; /* how many cache table blocks are evicted */
u_int64_t cleaner_executions; /* how many times the loop in cleaner_thread has executed */
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 maybe_get_and_pin(_clean) been called */
......@@ -181,6 +182,16 @@ typedef struct __toku_engine_status {
uint64_t cleaner_max_buffer_workdone; /* max workdone value of any message buffer flushed by cleaner thread */
uint64_t cleaner_min_buffer_workdone; /* min workdone value of any message buffer flushed by cleaner thread */
uint64_t cleaner_total_buffer_workdone; /* total workdone value of message buffers flushed by cleaner thread */
uint64_t flush_total; /* total number of flushes done by flusher threads or cleaner threads */
uint64_t flush_in_memory; /* number of in memory flushes */
uint64_t flush_needed_io; /* number of flushes that had to read a child (or part) off disk */
uint64_t flush_cascades; /* number of flushes that triggered another flush in the child */
uint64_t flush_cascades_1; /* number of flushes that triggered 1 cascading flush */
uint64_t flush_cascades_2; /* number of flushes that triggered 2 cascading flushes */
uint64_t flush_cascades_3; /* number of flushes that triggered 3 cascading flushes */
uint64_t flush_cascades_4; /* number of flushes that triggered 4 cascading flushes */
uint64_t flush_cascades_5; /* number of flushes that triggered 5 cascading flushes */
uint64_t flush_cascades_gt_5; /* number of flushes that triggered more than 5 cascading flushes */
u_int64_t point_queries; /* ydb point queries */
u_int64_t sequential_queries; /* ydb sequential queries */
u_int64_t le_max_committed_xr; /* max committed transaction records in any packed le */
......
......@@ -105,6 +105,7 @@ typedef struct __toku_engine_status {
u_int64_t cachetable_wait_writing; /* how many times get_and_pin waits for a node to be written */
u_int64_t cachetable_wait_checkpoint; /* how many times get_and_pin waits for a node to be written for a checkpoint*/
u_int64_t cachetable_evictions; /* how many cache table blocks are evicted */
u_int64_t cleaner_executions; /* how many times the loop in cleaner_thread has executed */
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 maybe_get_and_pin(_clean) been called */
......@@ -181,6 +182,16 @@ typedef struct __toku_engine_status {
uint64_t cleaner_max_buffer_workdone; /* max workdone value of any message buffer flushed by cleaner thread */
uint64_t cleaner_min_buffer_workdone; /* min workdone value of any message buffer flushed by cleaner thread */
uint64_t cleaner_total_buffer_workdone; /* total workdone value of message buffers flushed by cleaner thread */
uint64_t flush_total; /* total number of flushes done by flusher threads or cleaner threads */
uint64_t flush_in_memory; /* number of in memory flushes */
uint64_t flush_needed_io; /* number of flushes that had to read a child (or part) off disk */
uint64_t flush_cascades; /* number of flushes that triggered another flush in the child */
uint64_t flush_cascades_1; /* number of flushes that triggered 1 cascading flush */
uint64_t flush_cascades_2; /* number of flushes that triggered 2 cascading flushes */
uint64_t flush_cascades_3; /* number of flushes that triggered 3 cascading flushes */
uint64_t flush_cascades_4; /* number of flushes that triggered 4 cascading flushes */
uint64_t flush_cascades_5; /* number of flushes that triggered 5 cascading flushes */
uint64_t flush_cascades_gt_5; /* number of flushes that triggered more than 5 cascading flushes */
u_int64_t point_queries; /* ydb point queries */
u_int64_t sequential_queries; /* ydb sequential queries */
u_int64_t le_max_committed_xr; /* max committed transaction records in any packed le */
......
......@@ -105,6 +105,7 @@ typedef struct __toku_engine_status {
u_int64_t cachetable_wait_writing; /* how many times get_and_pin waits for a node to be written */
u_int64_t cachetable_wait_checkpoint; /* how many times get_and_pin waits for a node to be written for a checkpoint*/
u_int64_t cachetable_evictions; /* how many cache table blocks are evicted */
u_int64_t cleaner_executions; /* how many times the loop in cleaner_thread has executed */
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 maybe_get_and_pin(_clean) been called */
......@@ -181,6 +182,16 @@ typedef struct __toku_engine_status {
uint64_t cleaner_max_buffer_workdone; /* max workdone value of any message buffer flushed by cleaner thread */
uint64_t cleaner_min_buffer_workdone; /* min workdone value of any message buffer flushed by cleaner thread */
uint64_t cleaner_total_buffer_workdone; /* total workdone value of message buffers flushed by cleaner thread */
uint64_t flush_total; /* total number of flushes done by flusher threads or cleaner threads */
uint64_t flush_in_memory; /* number of in memory flushes */
uint64_t flush_needed_io; /* number of flushes that had to read a child (or part) off disk */
uint64_t flush_cascades; /* number of flushes that triggered another flush in the child */
uint64_t flush_cascades_1; /* number of flushes that triggered 1 cascading flush */
uint64_t flush_cascades_2; /* number of flushes that triggered 2 cascading flushes */
uint64_t flush_cascades_3; /* number of flushes that triggered 3 cascading flushes */
uint64_t flush_cascades_4; /* number of flushes that triggered 4 cascading flushes */
uint64_t flush_cascades_5; /* number of flushes that triggered 5 cascading flushes */
uint64_t flush_cascades_gt_5; /* number of flushes that triggered more than 5 cascading flushes */
u_int64_t point_queries; /* ydb point queries */
u_int64_t sequential_queries; /* ydb sequential queries */
u_int64_t le_max_committed_xr; /* max committed transaction records in any packed le */
......
......@@ -499,6 +499,7 @@ int main (int argc __attribute__((__unused__)), char *const argv[] __attribute__
printf(" u_int64_t cachetable_wait_writing; /* how many times get_and_pin waits for a node to be written */ \n");
printf(" u_int64_t cachetable_wait_checkpoint; /* how many times get_and_pin waits for a node to be written for a checkpoint*/ \n");
printf(" u_int64_t cachetable_evictions; /* how many cache table blocks are evicted */ \n");
printf(" u_int64_t cleaner_executions; /* how many times the loop in cleaner_thread has executed */ \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 maybe_get_and_pin(_clean) been called */ \n");
......@@ -575,6 +576,16 @@ int main (int argc __attribute__((__unused__)), char *const argv[] __attribute__
printf(" uint64_t cleaner_max_buffer_workdone; /* max workdone value of any message buffer flushed by cleaner thread */\n");
printf(" uint64_t cleaner_min_buffer_workdone; /* min workdone value of any message buffer flushed by cleaner thread */\n");
printf(" uint64_t cleaner_total_buffer_workdone; /* total workdone value of message buffers flushed by cleaner thread */\n");
printf(" uint64_t flush_total; /* total number of flushes done by flusher threads or cleaner threads */\n");
printf(" uint64_t flush_in_memory; /* number of in memory flushes */\n");
printf(" uint64_t flush_needed_io; /* number of flushes that had to read a child (or part) off disk */\n");
printf(" uint64_t flush_cascades; /* number of flushes that triggered another flush in the child */\n");
printf(" uint64_t flush_cascades_1; /* number of flushes that triggered 1 cascading flush */\n");
printf(" uint64_t flush_cascades_2; /* number of flushes that triggered 2 cascading flushes */\n");
printf(" uint64_t flush_cascades_3; /* number of flushes that triggered 3 cascading flushes */\n");
printf(" uint64_t flush_cascades_4; /* number of flushes that triggered 4 cascading flushes */\n");
printf(" uint64_t flush_cascades_5; /* number of flushes that triggered 5 cascading flushes */\n");
printf(" uint64_t flush_cascades_gt_5; /* number of flushes that triggered more than 5 cascading flushes */\n");
printf(" u_int64_t point_queries; /* ydb point queries */ \n");
printf(" u_int64_t sequential_queries; /* ydb sequential queries */ \n");
printf(" u_int64_t le_max_committed_xr; /* max committed transaction records in any packed le */ \n");
......
......@@ -105,6 +105,7 @@ typedef struct __toku_engine_status {
u_int64_t cachetable_wait_writing; /* how many times get_and_pin waits for a node to be written */
u_int64_t cachetable_wait_checkpoint; /* how many times get_and_pin waits for a node to be written for a checkpoint*/
u_int64_t cachetable_evictions; /* how many cache table blocks are evicted */
u_int64_t cleaner_executions; /* how many times the loop in cleaner_thread has executed */
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 maybe_get_and_pin(_clean) been called */
......@@ -181,6 +182,16 @@ typedef struct __toku_engine_status {
uint64_t cleaner_max_buffer_workdone; /* max workdone value of any message buffer flushed by cleaner thread */
uint64_t cleaner_min_buffer_workdone; /* min workdone value of any message buffer flushed by cleaner thread */
uint64_t cleaner_total_buffer_workdone; /* total workdone value of message buffers flushed by cleaner thread */
uint64_t flush_total; /* total number of flushes done by flusher threads or cleaner threads */
uint64_t flush_in_memory; /* number of in memory flushes */
uint64_t flush_needed_io; /* number of flushes that had to read a child (or part) off disk */
uint64_t flush_cascades; /* number of flushes that triggered another flush in the child */
uint64_t flush_cascades_1; /* number of flushes that triggered 1 cascading flush */
uint64_t flush_cascades_2; /* number of flushes that triggered 2 cascading flushes */
uint64_t flush_cascades_3; /* number of flushes that triggered 3 cascading flushes */
uint64_t flush_cascades_4; /* number of flushes that triggered 4 cascading flushes */
uint64_t flush_cascades_5; /* number of flushes that triggered 5 cascading flushes */
uint64_t flush_cascades_gt_5; /* number of flushes that triggered more than 5 cascading flushes */
u_int64_t point_queries; /* ydb point queries */
u_int64_t sequential_queries; /* ydb sequential queries */
u_int64_t le_max_committed_xr; /* max committed transaction records in any packed le */
......
......@@ -105,6 +105,7 @@ typedef struct __toku_engine_status {
u_int64_t cachetable_wait_writing; /* how many times get_and_pin waits for a node to be written */
u_int64_t cachetable_wait_checkpoint; /* how many times get_and_pin waits for a node to be written for a checkpoint*/
u_int64_t cachetable_evictions; /* how many cache table blocks are evicted */
u_int64_t cleaner_executions; /* how many times the loop in cleaner_thread has executed */
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 maybe_get_and_pin(_clean) been called */
......@@ -181,6 +182,16 @@ typedef struct __toku_engine_status {
uint64_t cleaner_max_buffer_workdone; /* max workdone value of any message buffer flushed by cleaner thread */
uint64_t cleaner_min_buffer_workdone; /* min workdone value of any message buffer flushed by cleaner thread */
uint64_t cleaner_total_buffer_workdone; /* total workdone value of message buffers flushed by cleaner thread */
uint64_t flush_total; /* total number of flushes done by flusher threads or cleaner threads */
uint64_t flush_in_memory; /* number of in memory flushes */
uint64_t flush_needed_io; /* number of flushes that had to read a child (or part) off disk */
uint64_t flush_cascades; /* number of flushes that triggered another flush in the child */
uint64_t flush_cascades_1; /* number of flushes that triggered 1 cascading flush */
uint64_t flush_cascades_2; /* number of flushes that triggered 2 cascading flushes */
uint64_t flush_cascades_3; /* number of flushes that triggered 3 cascading flushes */
uint64_t flush_cascades_4; /* number of flushes that triggered 4 cascading flushes */
uint64_t flush_cascades_5; /* number of flushes that triggered 5 cascading flushes */
uint64_t flush_cascades_gt_5; /* number of flushes that triggered more than 5 cascading flushes */
u_int64_t point_queries; /* ydb point queries */
u_int64_t sequential_queries; /* ydb sequential queries */
u_int64_t le_max_committed_xr; /* max committed transaction records in any packed le */
......
......@@ -653,7 +653,6 @@ int toku_pin_brtnode (BRT brt, BLOCKNUM blocknum, u_int32_t fullhash,
UNLOCKERS unlockers,
ANCESTORS ancestors, struct pivot_bounds const * const pbounds,
struct brtnode_fetch_extra *bfe,
BOOL apply_ancestor_messages, // this BOOL is probably temporary, for #3972, once we know how range query estimates work, will revisit this
BRTNODE *node_p)
__attribute__((__warn_unused_result__));
void toku_pin_brtnode_holding_lock (BRT brt, BLOCKNUM blocknum, u_int32_t fullhash,
......@@ -750,12 +749,6 @@ typedef struct brt_status {
uint64_t search_root_retries; // number of searches that required the root node to be fetched more than once
uint64_t search_tries_gt_height; // number of searches that required more tries than the height of the tree
uint64_t search_tries_gt_heightplus3; // number of searches that required more tries than the height of the tree plus three
uint64_t disk_flush_leaf; // number of leaf nodes flushed to disk, not for checkpoint
uint64_t disk_flush_nonleaf; // number of nonleaf nodes flushed to disk, not for checkpoint
uint64_t disk_flush_leaf_for_checkpoint; // number of leaf nodes flushed to disk for checkpoint
uint64_t disk_flush_nonleaf_for_checkpoint; // number of nonleaf nodes flushed to disk for checkpoint
uint64_t destroy_leaf; // number of leaf nodes destroyed
uint64_t destroy_nonleaf; // number of nonleaf nodes destroyed
uint64_t cleaner_total_nodes; // total number of nodes whose buffers are potentially flushed by cleaner thread
uint64_t cleaner_h1_nodes; // number of nodes of height one whose message buffers are flushed by cleaner thread
uint64_t cleaner_hgt1_nodes; // number of nodes of height > 1 whose message buffers are flushed by cleaner thread
......@@ -767,6 +760,16 @@ typedef struct brt_status {
uint64_t cleaner_max_buffer_workdone; // max workdone value of any message buffer flushed by cleaner thread
uint64_t cleaner_min_buffer_workdone;
uint64_t cleaner_total_buffer_workdone;
uint64_t flush_total; // total number of flushes done by flusher threads or cleaner threads
uint64_t flush_in_memory; // number of in memory flushes
uint64_t flush_needed_io; // number of flushes that had to read a child (or part) off disk
uint64_t flush_cascades; // number of flushes that triggered another flush in the child
uint64_t flush_cascades_1; // number of flushes that triggered 1 cascading flush
uint64_t flush_cascades_2; // number of flushes that triggered 2 cascading flushes
uint64_t flush_cascades_3; // number of flushes that triggered 3 cascading flushes
uint64_t flush_cascades_4; // number of flushes that triggered 4 cascading flushes
uint64_t flush_cascades_5; // number of flushes that triggered 5 cascading flushes
uint64_t flush_cascades_gt_5; // number of flushes that triggered more than 5 cascading flushes
} BRT_STATUS_S, *BRT_STATUS;
void toku_brt_get_status(BRT_STATUS);
......
This diff is collapsed.
......@@ -54,6 +54,7 @@ static u_int64_t local_checkpoint; // number of times a local checkpoint
static u_int64_t local_checkpoint_files; // number of files subject to local checkpoint taken for a commit (2440)
static u_int64_t local_checkpoint_during_checkpoint; // number of times a local checkpoint happened during normal checkpoint (2440)
static u_int64_t cachetable_evictions;
static u_int64_t cleaner_executions; // number of times the cleaner thread's loop has executed
enum ctpair_state {
......@@ -3589,6 +3590,7 @@ void toku_cachetable_get_status(CACHETABLE ct, CACHETABLE_STATUS s) {
s->local_checkpoint_files = local_checkpoint_files;
s->local_checkpoint_during_checkpoint = local_checkpoint_during_checkpoint;
s->evictions = cachetable_evictions;
s->cleaner_executions = cleaner_executions;
s->size_nonleaf = ct->size_nonleaf;
s->size_leaf = ct->size_leaf;
s->size_rollback = ct->size_rollback;
......@@ -3657,6 +3659,7 @@ cleaner_thread (void *cachetable_v)
assert(ct);
u_int32_t num_iterations = toku_get_cleaner_iterations(ct);
for (u_int32_t i = 0; i < num_iterations; ++i) {
cleaner_executions++;
cachetable_lock(ct);
PAIR best_pair = NULL;
int n_seen = 0;
......
......@@ -513,6 +513,7 @@ typedef struct cachetable_status {
uint64_t local_checkpoint_files; // number of files subject to local checkpoint taken for a commit (2440)
uint64_t local_checkpoint_during_checkpoint; // number of times a local checkpoint happened during normal checkpoint (2440)
u_int64_t evictions;
u_int64_t cleaner_executions; // number of times the cleaner thread's loop has executed
int64_t size_nonleaf; // number of bytes in cachetable belonging to nonleaf nodes
int64_t size_leaf; // number of bytes in cachetable belonging to leaf nodes
int64_t size_rollback; // number of bytes in cachetable belonging to rollback nodes
......
......@@ -79,10 +79,6 @@ static u_int64_t num_multi_updates;
static u_int64_t num_multi_updates_fail;
static u_int64_t num_point_queries;
static u_int64_t num_sequential_queries;
static u_int64_t num_db_open;
static u_int64_t num_db_close;
static u_int64_t max_db_open;
static u_int64_t num_open_dbs;
static u_int64_t directory_read_locks; /* total directory read locks taken */
static u_int64_t directory_read_locks_fail; /* total directory read locks unable to be taken */
......@@ -1979,6 +1975,7 @@ env_get_engine_status(DB_ENV * env, ENGINE_STATUS * engstat, char * env_panic_st
engstat->local_checkpoint_files = ctstat.local_checkpoint_files;
engstat->local_checkpoint_during_checkpoint = ctstat.local_checkpoint_during_checkpoint;
engstat->cachetable_evictions = ctstat.evictions;
engstat->cleaner_executions = ctstat.cleaner_executions;
engstat->cachetable_size_leaf = ctstat.size_leaf;
engstat->cachetable_size_nonleaf = ctstat.size_nonleaf;
engstat->cachetable_size_rollback = ctstat.size_rollback;
......@@ -2059,6 +2056,16 @@ env_get_engine_status(DB_ENV * env, ENGINE_STATUS * engstat, char * env_panic_st
engstat->cleaner_max_buffer_workdone = brt_stat.cleaner_max_buffer_workdone;
engstat->cleaner_min_buffer_workdone = brt_stat.cleaner_min_buffer_workdone;
engstat->cleaner_total_buffer_workdone = brt_stat.cleaner_total_buffer_workdone;
engstat->flush_total = brt_stat.flush_total;
engstat->flush_in_memory = brt_stat.flush_in_memory;
engstat->flush_needed_io = brt_stat.flush_needed_io;
engstat->flush_cascades = brt_stat.flush_cascades;
engstat->flush_cascades_1 = brt_stat.flush_cascades_1;
engstat->flush_cascades_2 = brt_stat.flush_cascades_2;
engstat->flush_cascades_3 = brt_stat.flush_cascades_3;
engstat->flush_cascades_4 = brt_stat.flush_cascades_4;
engstat->flush_cascades_5 = brt_stat.flush_cascades_5;
engstat->flush_cascades_gt_5 = brt_stat.flush_cascades_gt_5;
}
{
u_int64_t fsync_count, fsync_time;
......@@ -2225,6 +2232,7 @@ env_get_engine_status_text(DB_ENV * env, char * buff, int bufsiz) {
n += snprintf(buff + n, bufsiz - n, "cachetable_wait_reading %"PRIu64"\n", engstat.cachetable_wait_reading);
n += snprintf(buff + n, bufsiz - n, "cachetable_wait_writing %"PRIu64"\n", engstat.cachetable_wait_writing);
n += snprintf(buff + n, bufsiz - n, "cachetable_evictions %"PRIu64"\n", engstat.cachetable_evictions);
n += snprintf(buff + n, bufsiz - n, "cleaner_executions %"PRIu64"\n", engstat.cleaner_executions);
n += snprintf(buff + n, bufsiz - n, "puts %"PRIu64"\n", engstat.puts);
n += snprintf(buff + n, bufsiz - n, "prefetches %"PRIu64"\n", engstat.prefetches);
n += snprintf(buff + n, bufsiz - n, "maybe_get_and_pins %"PRIu64"\n", engstat.maybe_get_and_pins);
......@@ -2290,6 +2298,15 @@ env_get_engine_status_text(DB_ENV * env, char * buff, int bufsiz) {
n += snprintf(buff + n, bufsiz - n, "cleaner_max_buffer_workdone %"PRIu64"\n", engstat.cleaner_max_buffer_workdone);
n += snprintf(buff + n, bufsiz - n, "cleaner_min_buffer_workdone %"PRIu64"\n", engstat.cleaner_min_buffer_workdone);
n += snprintf(buff + n, bufsiz - n, "cleaner_total_buffer_workdone %"PRIu64"\n", engstat.cleaner_total_buffer_workdone);
n += snprintf(buff + n, bufsiz - n, "flush_total %"PRIu64"\n", engstat.flush_total);
n += snprintf(buff + n, bufsiz - n, "flush_needed_io %"PRIu64"\n", engstat.flush_needed_io);
n += snprintf(buff + n, bufsiz - n, "flush_cascades %"PRIu64"\n", engstat.flush_cascades);
n += snprintf(buff + n, bufsiz - n, "flush_cascades_1 %"PRIu64"\n", engstat.flush_cascades_1);
n += snprintf(buff + n, bufsiz - n, "flush_cascades_2 %"PRIu64"\n", engstat.flush_cascades_2);
n += snprintf(buff + n, bufsiz - n, "flush_cascades_3 %"PRIu64"\n", engstat.flush_cascades_3);
n += snprintf(buff + n, bufsiz - n, "flush_cascades_4 %"PRIu64"\n", engstat.flush_cascades_4);
n += snprintf(buff + n, bufsiz - n, "flush_cascades_5 %"PRIu64"\n", engstat.flush_cascades_5);
n += snprintf(buff + n, bufsiz - n, "flush_cascades_gt_5 %"PRIu64"\n", engstat.flush_cascades_gt_5);
n += snprintf(buff + n, bufsiz - n, "cleaner_period %"PRIu32"\n", engstat.cleaner_period);
n += snprintf(buff + n, bufsiz - n, "cleaner_iterations %"PRIu32"\n", engstat.cleaner_iterations);
n += snprintf(buff + n, bufsiz - n, "multi_inserts %"PRIu64"\n", engstat.multi_inserts);
......@@ -2999,10 +3016,6 @@ env_note_db_opened(DB_ENV *env, DB *db) {
OMTVALUE dbv;
uint32_t idx;
env->i->num_open_dbs++;
num_open_dbs = env->i->num_open_dbs;
num_db_open++;
if (num_open_dbs > max_db_open)
max_db_open = num_open_dbs;
r = toku_omt_find_zero(env->i->open_dbs, find_db_by_db, db, &dbv, &idx);
assert(r==DB_NOTFOUND); //Must not already be there.
r = toku_omt_insert_at(env->i->open_dbs, db, idx);
......@@ -3018,8 +3031,6 @@ env_note_db_closed(DB_ENV *env, DB *db) {
OMTVALUE dbv;
uint32_t idx;
env->i->num_open_dbs--;
num_open_dbs = env->i->num_open_dbs;
num_db_close++;
r = toku_omt_find_zero(env->i->open_dbs, find_db_by_db, db, &dbv, &idx);
assert(r==0); //Must already be there.
assert((DB*)dbv == db);
......
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