Commit 9057d69d authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

[t:3988] #3988 Make thrashing stats available via engine status. Must still display in handlerton.

git-svn-id: file:///svn/toku/tokudb@35888 c7de825b-a66e-492c-adef-691d508d4ae1
parent 1a89aae7
......@@ -156,6 +156,13 @@ typedef struct __toku_engine_status {
u_int64_t msn_discards; /* how many messages were ignored by leaf because of msn */
u_int64_t max_workdone; /* max workdone value of any buffer */
u_int64_t dsn_gap; /* dsn has detected a gap in continuity of root-to-leaf path (internal node was evicted and re-read) */
uint64_t total_searches; /* total number of searches */
uint64_t total_retries; /* total number of search retries due to TRY_AGAIN */
uint64_t max_search_excess_retries; /* max number of excess search retries (retries - treeheight) due to TRY_AGAIN */
uint64_t max_search_root_tries; /* max number of times root node was fetched in a single search */
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 */
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 */
......
......@@ -156,6 +156,13 @@ typedef struct __toku_engine_status {
u_int64_t msn_discards; /* how many messages were ignored by leaf because of msn */
u_int64_t max_workdone; /* max workdone value of any buffer */
u_int64_t dsn_gap; /* dsn has detected a gap in continuity of root-to-leaf path (internal node was evicted and re-read) */
uint64_t total_searches; /* total number of searches */
uint64_t total_retries; /* total number of search retries due to TRY_AGAIN */
uint64_t max_search_excess_retries; /* max number of excess search retries (retries - treeheight) due to TRY_AGAIN */
uint64_t max_search_root_tries; /* max number of times root node was fetched in a single search */
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 */
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 */
......
......@@ -156,6 +156,13 @@ typedef struct __toku_engine_status {
u_int64_t msn_discards; /* how many messages were ignored by leaf because of msn */
u_int64_t max_workdone; /* max workdone value of any buffer */
u_int64_t dsn_gap; /* dsn has detected a gap in continuity of root-to-leaf path (internal node was evicted and re-read) */
uint64_t total_searches; /* total number of searches */
uint64_t total_retries; /* total number of search retries due to TRY_AGAIN */
uint64_t max_search_excess_retries; /* max number of excess search retries (retries - treeheight) due to TRY_AGAIN */
uint64_t max_search_root_tries; /* max number of times root node was fetched in a single search */
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 */
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 */
......
......@@ -156,6 +156,13 @@ typedef struct __toku_engine_status {
u_int64_t msn_discards; /* how many messages were ignored by leaf because of msn */
u_int64_t max_workdone; /* max workdone value of any buffer */
u_int64_t dsn_gap; /* dsn has detected a gap in continuity of root-to-leaf path (internal node was evicted and re-read) */
uint64_t total_searches; /* total number of searches */
uint64_t total_retries; /* total number of search retries due to TRY_AGAIN */
uint64_t max_search_excess_retries; /* max number of excess search retries (retries - treeheight) due to TRY_AGAIN */
uint64_t max_search_root_tries; /* max number of times root node was fetched in a single search */
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 */
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 */
......
......@@ -156,6 +156,13 @@ typedef struct __toku_engine_status {
u_int64_t msn_discards; /* how many messages were ignored by leaf because of msn */
u_int64_t max_workdone; /* max workdone value of any buffer */
u_int64_t dsn_gap; /* dsn has detected a gap in continuity of root-to-leaf path (internal node was evicted and re-read) */
uint64_t total_searches; /* total number of searches */
uint64_t total_retries; /* total number of search retries due to TRY_AGAIN */
uint64_t max_search_excess_retries; /* max number of excess search retries (retries - treeheight) due to TRY_AGAIN */
uint64_t max_search_root_tries; /* max number of times root node was fetched in a single search */
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 */
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 */
......
......@@ -550,6 +550,13 @@ int main (int argc __attribute__((__unused__)), char *const argv[] __attribute__
printf(" u_int64_t msn_discards; /* how many messages were ignored by leaf because of msn */ \n");
printf(" u_int64_t max_workdone; /* max workdone value of any buffer */ \n");
printf(" u_int64_t dsn_gap; /* dsn has detected a gap in continuity of root-to-leaf path (internal node was evicted and re-read) */ \n");
printf(" uint64_t total_searches; /* total number of searches */ \n");
printf(" uint64_t total_retries; /* total number of search retries due to TRY_AGAIN */ \n");
printf(" uint64_t max_search_excess_retries; /* max number of excess search retries (retries - treeheight) due to TRY_AGAIN */ \n");
printf(" uint64_t max_search_root_tries; /* max number of times root node was fetched in a single search */ \n");
printf(" uint64_t search_root_retries; /* number of searches that required the root node to be fetched more than once */ \n");
printf(" uint64_t search_tries_gt_height; /* number of searches that required more tries than the height of the tree */ \n");
printf(" uint64_t search_tries_gt_heightplus3; /* number of searches that required more tries than the height of the tree plus three */ \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");
......
......@@ -156,6 +156,13 @@ typedef struct __toku_engine_status {
u_int64_t msn_discards; /* how many messages were ignored by leaf because of msn */
u_int64_t max_workdone; /* max workdone value of any buffer */
u_int64_t dsn_gap; /* dsn has detected a gap in continuity of root-to-leaf path (internal node was evicted and re-read) */
uint64_t total_searches; /* total number of searches */
uint64_t total_retries; /* total number of search retries due to TRY_AGAIN */
uint64_t max_search_excess_retries; /* max number of excess search retries (retries - treeheight) due to TRY_AGAIN */
uint64_t max_search_root_tries; /* max number of times root node was fetched in a single search */
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 */
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 */
......
......@@ -156,6 +156,13 @@ typedef struct __toku_engine_status {
u_int64_t msn_discards; /* how many messages were ignored by leaf because of msn */
u_int64_t max_workdone; /* max workdone value of any buffer */
u_int64_t dsn_gap; /* dsn has detected a gap in continuity of root-to-leaf path (internal node was evicted and re-read) */
uint64_t total_searches; /* total number of searches */
uint64_t total_retries; /* total number of search retries due to TRY_AGAIN */
uint64_t max_search_excess_retries; /* max number of excess search retries (retries - treeheight) due to TRY_AGAIN */
uint64_t max_search_root_tries; /* max number of times root node was fetched in a single search */
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 */
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 */
......
......@@ -1969,6 +1969,13 @@ env_get_engine_status(DB_ENV * env, ENGINE_STATUS * engstat, char * env_panic_st
engstat->msn_discards = brt_stat.msn_discards;
engstat->max_workdone = brt_stat.max_workdone;
engstat->dsn_gap = brt_stat.dsn_gap;
engstat->total_searches = brt_stat.total_searches;
engstat->total_retries = brt_stat.total_retries;
engstat->max_search_excess_retries = brt_stat.max_search_excess_retries;
engstat->max_search_root_tries = brt_stat.max_search_root_tries;
engstat->search_root_retries = brt_stat.search_root_retries;
engstat->search_tries_gt_height = brt_stat.search_tries_gt_height;
engstat->search_tries_gt_heightplus3 = brt_stat.search_tries_gt_heightplus3;
engstat->cachetable_size_leaf = brt_stat.bytes_leaf;
engstat->cachetable_size_nonleaf = brt_stat.bytes_nonleaf;
}
......@@ -2181,6 +2188,13 @@ env_get_engine_status_text(DB_ENV * env, char * buff, int bufsiz) {
n += snprintf(buff + n, bufsiz - n, "msn_discards %"PRIu64"\n", engstat.msn_discards);
n += snprintf(buff + n, bufsiz - n, "max_workdone %"PRIu64"\n", engstat.max_workdone);
n += snprintf(buff + n, bufsiz - n, "dsn_gap %"PRIu64"\n", engstat.dsn_gap);
n += snprintf(buff + n, bufsiz - n, "total_searches %"PRIu64"\n", engstat.total_searches);
n += snprintf(buff + n, bufsiz - n, "total_retries %"PRIu64"\n", engstat.total_retries);
n += snprintf(buff + n, bufsiz - n, "max_search_excess_retries %"PRIu64"\n", engstat.max_search_excess_retries);
n += snprintf(buff + n, bufsiz - n, "max_search_root_tries %"PRIu64"\n", engstat.max_search_root_tries);
n += snprintf(buff + n, bufsiz - n, "search_root_retries %"PRIu64"\n", engstat.search_root_retries);
n += snprintf(buff + n, bufsiz - n, "search_tries_gt_height %"PRIu64"\n", engstat.search_tries_gt_height);
n += snprintf(buff + n, bufsiz - n, "search_tries_gt_heightplus3 %"PRIu64"\n", engstat.search_tries_gt_heightplus3);
n += snprintf(buff + n, bufsiz - n, "multi_inserts %"PRIu64"\n", engstat.multi_inserts);
n += snprintf(buff + n, bufsiz - n, "multi_inserts_fail %"PRIu64"\n", engstat.multi_inserts_fail);
n += snprintf(buff + n, bufsiz - n, "multi_deletes %"PRIu64"\n", engstat.multi_deletes);
......
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