diff options
Diffstat (limited to 'src/third_party/wiredtiger/examples/c/ex_stat.c')
-rw-r--r-- | src/third_party/wiredtiger/examples/c/ex_stat.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/examples/c/ex_stat.c b/src/third_party/wiredtiger/examples/c/ex_stat.c index bc13197038a..fb9e9d07c98 100644 --- a/src/third_party/wiredtiger/examples/c/ex_stat.c +++ b/src/third_party/wiredtiger/examples/c/ex_stat.c @@ -37,6 +37,7 @@ void print_derived_stats(WT_SESSION *); void print_file_stats(WT_SESSION *); void print_join_cursor_stats(WT_SESSION *); void print_overflow_pages(WT_SESSION *); +void print_session_stats(WT_SESSION *); static const char *home; @@ -114,6 +115,20 @@ print_join_cursor_stats(WT_SESSION *session) } void +print_session_stats(WT_SESSION *session) +{ + WT_CURSOR *stat_cursor; + + /*! [statistics session function] */ + error_check(session->open_cursor(session, + "statistics:session", NULL, NULL, &stat_cursor)); + + print_cursor(stat_cursor); + error_check(stat_cursor->close(stat_cursor)); + /*! [statistics session function] */ +} + +void print_overflow_pages(WT_SESSION *session) { /*! [statistics retrieve by key] */ @@ -217,6 +232,8 @@ main(int argc, char *argv[]) print_join_cursor_stats(session); + print_session_stats(session); + print_overflow_pages(session); print_derived_stats(session); |