diff options
-rw-r--r-- | dist/stat_data.py | 2 | ||||
-rw-r--r-- | src/btree/bt_stat.c | 10 | ||||
-rw-r--r-- | src/include/stat.h | 1 | ||||
-rw-r--r-- | src/include/wiredtiger.in | 148 | ||||
-rw-r--r-- | src/support/stat.c | 4 | ||||
-rw-r--r-- | tools/wtstats/stat_data.py | 1 |
6 files changed, 90 insertions, 76 deletions
diff --git a/dist/stat_data.py b/dist/stat_data.py index 1ec456b4700..01a1479cf42 100644 --- a/dist/stat_data.py +++ b/dist/stat_data.py @@ -398,6 +398,8 @@ dsrc_stats = [ 'column-store fixed-size leaf pages', 'no_scale'), BtreeStat('btree_column_internal', 'column-store internal pages', 'no_scale'), + BtreeStat('btree_column_rle', + 'column-store variable-size RLE encoded values', 'no_scale'), BtreeStat('btree_column_variable', 'column-store variable-size leaf pages', 'no_scale'), BtreeStat('btree_compact_rewrite', 'pages rewritten by compaction'), diff --git a/src/btree/bt_stat.c b/src/btree/bt_stat.c index 9a0584d3217..b379712f6e7 100644 --- a/src/btree/bt_stat.c +++ b/src/btree/bt_stat.c @@ -51,6 +51,7 @@ __wt_btree_stat_init(WT_SESSION_IMPL *session, WT_CURSOR_STAT *cst) WT_STAT_SET(session, stats, btree_column_deleted, 0); WT_STAT_SET(session, stats, btree_column_fix, 0); WT_STAT_SET(session, stats, btree_column_internal, 0); + WT_STAT_SET(session, stats, btree_column_rle, 0); WT_STAT_SET(session, stats, btree_column_variable, 0); WT_STAT_SET(session, stats, btree_entries, 0); WT_STAT_SET(session, stats, btree_overflow, 0); @@ -114,12 +115,12 @@ __stat_page_col_var( WT_COL *cip; WT_INSERT *ins; WT_UPDATE *upd; - uint64_t deleted_cnt, entry_cnt, ovfl_cnt; + uint64_t deleted_cnt, entry_cnt, ovfl_cnt, rle_cnt; uint32_t i; int orig_deleted; unpack = &_unpack; - deleted_cnt = entry_cnt = ovfl_cnt = 0; + deleted_cnt = entry_cnt = ovfl_cnt = rle_cnt = 0; WT_STAT_INCR(session, stats, btree_column_variable); @@ -140,8 +141,10 @@ __stat_page_col_var( __wt_cell_unpack(cell, unpack); if (unpack->type == WT_CELL_ADDR_DEL) orig_deleted = 1; - else + else { entry_cnt += __wt_cell_rle(unpack); + rle_cnt += __wt_cell_rle(unpack) - 1; + } if (unpack->ovfl) ++ovfl_cnt; } @@ -173,6 +176,7 @@ __stat_page_col_var( ++entry_cnt; WT_STAT_INCRV(session, stats, btree_column_deleted, deleted_cnt); + WT_STAT_INCRV(session, stats, btree_column_rle, rle_cnt); WT_STAT_INCRV(session, stats, btree_entries, entry_cnt); WT_STAT_INCRV(session, stats, btree_overflow, ovfl_cnt); } diff --git a/src/include/stat.h b/src/include/stat.h index 9252e86ed8c..6ffb0d1d7dd 100644 --- a/src/include/stat.h +++ b/src/include/stat.h @@ -405,6 +405,7 @@ struct __wt_dsrc_stats { int64_t btree_column_deleted; int64_t btree_column_fix; int64_t btree_column_internal; + int64_t btree_column_rle; int64_t btree_column_variable; int64_t btree_compact_rewrite; int64_t btree_entries; diff --git a/src/include/wiredtiger.in b/src/include/wiredtiger.in index 33f35bfc62d..07c17e7a0ac 100644 --- a/src/include/wiredtiger.in +++ b/src/include/wiredtiger.in @@ -3898,154 +3898,156 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection); #define WT_STAT_DSRC_BTREE_COLUMN_FIX 2019 /*! btree: column-store internal pages */ #define WT_STAT_DSRC_BTREE_COLUMN_INTERNAL 2020 +/*! btree: column-store variable-size RLE encoded values */ +#define WT_STAT_DSRC_BTREE_COLUMN_RLE 2021 /*! btree: column-store variable-size leaf pages */ -#define WT_STAT_DSRC_BTREE_COLUMN_VARIABLE 2021 +#define WT_STAT_DSRC_BTREE_COLUMN_VARIABLE 2022 /*! btree: pages rewritten by compaction */ -#define WT_STAT_DSRC_BTREE_COMPACT_REWRITE 2022 +#define WT_STAT_DSRC_BTREE_COMPACT_REWRITE 2023 /*! btree: number of key/value pairs */ -#define WT_STAT_DSRC_BTREE_ENTRIES 2023 +#define WT_STAT_DSRC_BTREE_ENTRIES 2024 /*! btree: fixed-record size */ -#define WT_STAT_DSRC_BTREE_FIXED_LEN 2024 +#define WT_STAT_DSRC_BTREE_FIXED_LEN 2025 /*! btree: maximum tree depth */ -#define WT_STAT_DSRC_BTREE_MAXIMUM_DEPTH 2025 +#define WT_STAT_DSRC_BTREE_MAXIMUM_DEPTH 2026 /*! btree: maximum internal page key size */ -#define WT_STAT_DSRC_BTREE_MAXINTLKEY 2026 +#define WT_STAT_DSRC_BTREE_MAXINTLKEY 2027 /*! btree: maximum internal page size */ -#define WT_STAT_DSRC_BTREE_MAXINTLPAGE 2027 +#define WT_STAT_DSRC_BTREE_MAXINTLPAGE 2028 /*! btree: maximum leaf page key size */ -#define WT_STAT_DSRC_BTREE_MAXLEAFKEY 2028 +#define WT_STAT_DSRC_BTREE_MAXLEAFKEY 2029 /*! btree: maximum leaf page size */ -#define WT_STAT_DSRC_BTREE_MAXLEAFPAGE 2029 +#define WT_STAT_DSRC_BTREE_MAXLEAFPAGE 2030 /*! btree: maximum leaf page value size */ -#define WT_STAT_DSRC_BTREE_MAXLEAFVALUE 2030 +#define WT_STAT_DSRC_BTREE_MAXLEAFVALUE 2031 /*! btree: overflow pages */ -#define WT_STAT_DSRC_BTREE_OVERFLOW 2031 +#define WT_STAT_DSRC_BTREE_OVERFLOW 2032 /*! btree: row-store internal pages */ -#define WT_STAT_DSRC_BTREE_ROW_INTERNAL 2032 +#define WT_STAT_DSRC_BTREE_ROW_INTERNAL 2033 /*! btree: row-store leaf pages */ -#define WT_STAT_DSRC_BTREE_ROW_LEAF 2033 +#define WT_STAT_DSRC_BTREE_ROW_LEAF 2034 /*! cache: bytes read into cache */ -#define WT_STAT_DSRC_CACHE_BYTES_READ 2034 +#define WT_STAT_DSRC_CACHE_BYTES_READ 2035 /*! cache: bytes written from cache */ -#define WT_STAT_DSRC_CACHE_BYTES_WRITE 2035 +#define WT_STAT_DSRC_CACHE_BYTES_WRITE 2036 /*! cache: checkpoint blocked page eviction */ -#define WT_STAT_DSRC_CACHE_EVICTION_CHECKPOINT 2036 +#define WT_STAT_DSRC_CACHE_EVICTION_CHECKPOINT 2037 /*! cache: unmodified pages evicted */ -#define WT_STAT_DSRC_CACHE_EVICTION_CLEAN 2037 +#define WT_STAT_DSRC_CACHE_EVICTION_CLEAN 2038 /*! cache: page split during eviction deepened the tree */ -#define WT_STAT_DSRC_CACHE_EVICTION_DEEPEN 2038 +#define WT_STAT_DSRC_CACHE_EVICTION_DEEPEN 2039 /*! cache: modified pages evicted */ -#define WT_STAT_DSRC_CACHE_EVICTION_DIRTY 2039 +#define WT_STAT_DSRC_CACHE_EVICTION_DIRTY 2040 /*! cache: data source pages selected for eviction unable to be evicted */ -#define WT_STAT_DSRC_CACHE_EVICTION_FAIL 2040 +#define WT_STAT_DSRC_CACHE_EVICTION_FAIL 2041 /*! cache: hazard pointer blocked page eviction */ -#define WT_STAT_DSRC_CACHE_EVICTION_HAZARD 2041 +#define WT_STAT_DSRC_CACHE_EVICTION_HAZARD 2042 /*! cache: internal pages evicted */ -#define WT_STAT_DSRC_CACHE_EVICTION_INTERNAL 2042 +#define WT_STAT_DSRC_CACHE_EVICTION_INTERNAL 2043 /*! cache: pages split during eviction */ -#define WT_STAT_DSRC_CACHE_EVICTION_SPLIT 2043 +#define WT_STAT_DSRC_CACHE_EVICTION_SPLIT 2044 /*! cache: in-memory page splits */ -#define WT_STAT_DSRC_CACHE_INMEM_SPLIT 2044 +#define WT_STAT_DSRC_CACHE_INMEM_SPLIT 2045 /*! cache: overflow values cached in memory */ -#define WT_STAT_DSRC_CACHE_OVERFLOW_VALUE 2045 +#define WT_STAT_DSRC_CACHE_OVERFLOW_VALUE 2046 /*! cache: pages read into cache */ -#define WT_STAT_DSRC_CACHE_READ 2046 +#define WT_STAT_DSRC_CACHE_READ 2047 /*! cache: pages read into cache requiring lookaside entries */ -#define WT_STAT_DSRC_CACHE_READ_LOOKASIDE 2047 +#define WT_STAT_DSRC_CACHE_READ_LOOKASIDE 2048 /*! cache: overflow pages read into cache */ -#define WT_STAT_DSRC_CACHE_READ_OVERFLOW 2048 +#define WT_STAT_DSRC_CACHE_READ_OVERFLOW 2049 /*! cache: pages written from cache */ -#define WT_STAT_DSRC_CACHE_WRITE 2049 +#define WT_STAT_DSRC_CACHE_WRITE 2050 /*! cache: page written requiring lookaside records */ -#define WT_STAT_DSRC_CACHE_WRITE_LOOKASIDE 2050 +#define WT_STAT_DSRC_CACHE_WRITE_LOOKASIDE 2051 /*! cache: pages written requiring in-memory restoration */ -#define WT_STAT_DSRC_CACHE_WRITE_RESTORE 2051 +#define WT_STAT_DSRC_CACHE_WRITE_RESTORE 2052 /*! compression: raw compression call failed, no additional data available */ -#define WT_STAT_DSRC_COMPRESS_RAW_FAIL 2052 +#define WT_STAT_DSRC_COMPRESS_RAW_FAIL 2053 /*! compression: raw compression call failed, additional data available */ -#define WT_STAT_DSRC_COMPRESS_RAW_FAIL_TEMPORARY 2053 +#define WT_STAT_DSRC_COMPRESS_RAW_FAIL_TEMPORARY 2054 /*! compression: raw compression call succeeded */ -#define WT_STAT_DSRC_COMPRESS_RAW_OK 2054 +#define WT_STAT_DSRC_COMPRESS_RAW_OK 2055 /*! compression: compressed pages read */ -#define WT_STAT_DSRC_COMPRESS_READ 2055 +#define WT_STAT_DSRC_COMPRESS_READ 2056 /*! compression: compressed pages written */ -#define WT_STAT_DSRC_COMPRESS_WRITE 2056 +#define WT_STAT_DSRC_COMPRESS_WRITE 2057 /*! compression: page written failed to compress */ -#define WT_STAT_DSRC_COMPRESS_WRITE_FAIL 2057 +#define WT_STAT_DSRC_COMPRESS_WRITE_FAIL 2058 /*! compression: page written was too small to compress */ -#define WT_STAT_DSRC_COMPRESS_WRITE_TOO_SMALL 2058 +#define WT_STAT_DSRC_COMPRESS_WRITE_TOO_SMALL 2059 /*! cursor: create calls */ -#define WT_STAT_DSRC_CURSOR_CREATE 2059 +#define WT_STAT_DSRC_CURSOR_CREATE 2060 /*! cursor: insert calls */ -#define WT_STAT_DSRC_CURSOR_INSERT 2060 +#define WT_STAT_DSRC_CURSOR_INSERT 2061 /*! cursor: bulk-loaded cursor-insert calls */ -#define WT_STAT_DSRC_CURSOR_INSERT_BULK 2061 +#define WT_STAT_DSRC_CURSOR_INSERT_BULK 2062 /*! cursor: cursor-insert key and value bytes inserted */ -#define WT_STAT_DSRC_CURSOR_INSERT_BYTES 2062 +#define WT_STAT_DSRC_CURSOR_INSERT_BYTES 2063 /*! cursor: next calls */ -#define WT_STAT_DSRC_CURSOR_NEXT 2063 +#define WT_STAT_DSRC_CURSOR_NEXT 2064 /*! cursor: prev calls */ -#define WT_STAT_DSRC_CURSOR_PREV 2064 +#define WT_STAT_DSRC_CURSOR_PREV 2065 /*! cursor: remove calls */ -#define WT_STAT_DSRC_CURSOR_REMOVE 2065 +#define WT_STAT_DSRC_CURSOR_REMOVE 2066 /*! cursor: cursor-remove key bytes removed */ -#define WT_STAT_DSRC_CURSOR_REMOVE_BYTES 2066 +#define WT_STAT_DSRC_CURSOR_REMOVE_BYTES 2067 /*! cursor: reset calls */ -#define WT_STAT_DSRC_CURSOR_RESET 2067 +#define WT_STAT_DSRC_CURSOR_RESET 2068 /*! cursor: restarted searches */ -#define WT_STAT_DSRC_CURSOR_RESTART 2068 +#define WT_STAT_DSRC_CURSOR_RESTART 2069 /*! cursor: search calls */ -#define WT_STAT_DSRC_CURSOR_SEARCH 2069 +#define WT_STAT_DSRC_CURSOR_SEARCH 2070 /*! cursor: search near calls */ -#define WT_STAT_DSRC_CURSOR_SEARCH_NEAR 2070 +#define WT_STAT_DSRC_CURSOR_SEARCH_NEAR 2071 /*! cursor: update calls */ -#define WT_STAT_DSRC_CURSOR_UPDATE 2071 +#define WT_STAT_DSRC_CURSOR_UPDATE 2072 /*! cursor: cursor-update value bytes updated */ -#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES 2072 +#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES 2073 /*! LSM: sleep for LSM checkpoint throttle */ -#define WT_STAT_DSRC_LSM_CHECKPOINT_THROTTLE 2073 +#define WT_STAT_DSRC_LSM_CHECKPOINT_THROTTLE 2074 /*! LSM: chunks in the LSM tree */ -#define WT_STAT_DSRC_LSM_CHUNK_COUNT 2074 +#define WT_STAT_DSRC_LSM_CHUNK_COUNT 2075 /*! LSM: highest merge generation in the LSM tree */ -#define WT_STAT_DSRC_LSM_GENERATION_MAX 2075 +#define WT_STAT_DSRC_LSM_GENERATION_MAX 2076 /*! LSM: queries that could have benefited from a Bloom filter that did * not exist */ -#define WT_STAT_DSRC_LSM_LOOKUP_NO_BLOOM 2076 +#define WT_STAT_DSRC_LSM_LOOKUP_NO_BLOOM 2077 /*! LSM: sleep for LSM merge throttle */ -#define WT_STAT_DSRC_LSM_MERGE_THROTTLE 2077 +#define WT_STAT_DSRC_LSM_MERGE_THROTTLE 2078 /*! reconciliation: dictionary matches */ -#define WT_STAT_DSRC_REC_DICTIONARY 2078 +#define WT_STAT_DSRC_REC_DICTIONARY 2079 /*! reconciliation: internal page multi-block writes */ -#define WT_STAT_DSRC_REC_MULTIBLOCK_INTERNAL 2079 +#define WT_STAT_DSRC_REC_MULTIBLOCK_INTERNAL 2080 /*! reconciliation: leaf page multi-block writes */ -#define WT_STAT_DSRC_REC_MULTIBLOCK_LEAF 2080 +#define WT_STAT_DSRC_REC_MULTIBLOCK_LEAF 2081 /*! reconciliation: maximum blocks required for a page */ -#define WT_STAT_DSRC_REC_MULTIBLOCK_MAX 2081 +#define WT_STAT_DSRC_REC_MULTIBLOCK_MAX 2082 /*! reconciliation: internal-page overflow keys */ -#define WT_STAT_DSRC_REC_OVERFLOW_KEY_INTERNAL 2082 +#define WT_STAT_DSRC_REC_OVERFLOW_KEY_INTERNAL 2083 /*! reconciliation: leaf-page overflow keys */ -#define WT_STAT_DSRC_REC_OVERFLOW_KEY_LEAF 2083 +#define WT_STAT_DSRC_REC_OVERFLOW_KEY_LEAF 2084 /*! reconciliation: overflow values written */ -#define WT_STAT_DSRC_REC_OVERFLOW_VALUE 2084 +#define WT_STAT_DSRC_REC_OVERFLOW_VALUE 2085 /*! reconciliation: pages deleted */ -#define WT_STAT_DSRC_REC_PAGE_DELETE 2085 +#define WT_STAT_DSRC_REC_PAGE_DELETE 2086 /*! reconciliation: page checksum matches */ -#define WT_STAT_DSRC_REC_PAGE_MATCH 2086 +#define WT_STAT_DSRC_REC_PAGE_MATCH 2087 /*! reconciliation: page reconciliation calls */ -#define WT_STAT_DSRC_REC_PAGES 2087 +#define WT_STAT_DSRC_REC_PAGES 2088 /*! reconciliation: page reconciliation calls for eviction */ -#define WT_STAT_DSRC_REC_PAGES_EVICTION 2088 +#define WT_STAT_DSRC_REC_PAGES_EVICTION 2089 /*! reconciliation: leaf page key bytes discarded using prefix compression */ -#define WT_STAT_DSRC_REC_PREFIX_COMPRESSION 2089 +#define WT_STAT_DSRC_REC_PREFIX_COMPRESSION 2090 /*! reconciliation: internal page key bytes discarded using suffix * compression */ -#define WT_STAT_DSRC_REC_SUFFIX_COMPRESSION 2090 +#define WT_STAT_DSRC_REC_SUFFIX_COMPRESSION 2091 /*! session: object compaction */ -#define WT_STAT_DSRC_SESSION_COMPACT 2091 +#define WT_STAT_DSRC_SESSION_COMPACT 2092 /*! session: open cursor count */ -#define WT_STAT_DSRC_SESSION_CURSOR_OPEN 2092 +#define WT_STAT_DSRC_SESSION_CURSOR_OPEN 2093 /*! transaction: update conflicts */ -#define WT_STAT_DSRC_TXN_UPDATE_CONFLICT 2093 +#define WT_STAT_DSRC_TXN_UPDATE_CONFLICT 2094 /*! @} */ /* * Statistics section: END diff --git a/src/support/stat.c b/src/support/stat.c index e9d199d57e6..c8dd30e1c39 100644 --- a/src/support/stat.c +++ b/src/support/stat.c @@ -24,6 +24,7 @@ static const char * const __stats_dsrc_desc[] = { "btree: column-store variable-size deleted values", "btree: column-store fixed-size leaf pages", "btree: column-store internal pages", + "btree: column-store variable-size RLE encoded values", "btree: column-store variable-size leaf pages", "btree: pages rewritten by compaction", "btree: number of key/value pairs", @@ -140,6 +141,7 @@ __wt_stat_dsrc_clear_single(WT_DSRC_STATS *stats) stats->btree_column_internal = 0; stats->btree_column_deleted = 0; stats->btree_column_variable = 0; + stats->btree_column_rle = 0; stats->btree_fixed_len = 0; stats->btree_maxintlkey = 0; stats->btree_maxintlpage = 0; @@ -249,6 +251,7 @@ __wt_stat_dsrc_aggregate_single( to->btree_column_internal += from->btree_column_internal; to->btree_column_deleted += from->btree_column_deleted; to->btree_column_variable += from->btree_column_variable; + to->btree_column_rle += from->btree_column_rle; to->btree_fixed_len = from->btree_fixed_len; if (from->btree_maxintlkey > to->btree_maxintlkey) to->btree_maxintlkey = from->btree_maxintlkey; @@ -363,6 +366,7 @@ __wt_stat_dsrc_aggregate( to->btree_column_deleted += WT_STAT_READ(from, btree_column_deleted); to->btree_column_variable += WT_STAT_READ(from, btree_column_variable); + to->btree_column_rle += WT_STAT_READ(from, btree_column_rle); to->btree_fixed_len = from[0]->btree_fixed_len; if ((v = WT_STAT_READ(from, btree_maxintlkey)) > to->btree_maxintlkey) diff --git a/tools/wtstats/stat_data.py b/tools/wtstats/stat_data.py index 3fbc634385a..f2f193c0860 100644 --- a/tools/wtstats/stat_data.py +++ b/tools/wtstats/stat_data.py @@ -43,6 +43,7 @@ no_scale_per_second_list = [ 'btree: column-store internal pages', 'btree: column-store variable-size deleted values', 'btree: column-store variable-size leaf pages', + 'btree: column-store variable-size RLE encoded values', 'btree: fixed-record size', 'btree: maximum internal page key size', 'btree: maximum internal page size', |