Commit d1c5f2eb authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

[t:4169] adding engine status variable to count leaf node merges missed by cleaner thread

git-svn-id: file:///svn/toku/tokudb@37929 c7de825b-a66e-492c-adef-691d508d4ae1
parent bd3fc584
......@@ -585,6 +585,7 @@ 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 cleaner_num_leaves_unmerged; /* number of leaves left unmerged by the 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");
......
......@@ -1292,6 +1292,7 @@ flush_some_child(
// prevent merging leaf nodes, sometimes (when the cleaner thread
// called us)
child_re = RE_STABLE;
brt_status->cleaner_num_leaves_unmerged++;
}
// if the parent has been unpinned above, then
// this is our only option, even if the child is not stable
......
......@@ -810,6 +810,7 @@ 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 cleaner_num_leaves_unmerged; // number of leaves left unmerged by the 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
......
......@@ -2069,6 +2069,7 @@ 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->cleaner_num_leaves_unmerged = brt_stat.cleaner_num_leaves_unmerged;
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;
......@@ -2359,6 +2360,7 @@ 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, "cleaner_num_leaves_unmerged %"PRIu64"\n", engstat.cleaner_num_leaves_unmerged);
n += snprintf(buff + n, bufsiz - n, "flush_total %"PRIu64"\n", engstat.flush_total);
n += snprintf(buff + n, bufsiz - n, "flush_in_memory %"PRIu64"\n", engstat.flush_in_memory);
n += snprintf(buff + n, bufsiz - n, "flush_needed_io %"PRIu64"\n", engstat.flush_needed_io);
......
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