diff options
author | Keith Bostic <keith@wiredtiger.com> | 2015-11-30 11:04:05 -0500 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2015-11-30 11:04:05 -0500 |
commit | bd0f24b3d6f95a05eba3c08bf817eb7e7d26675d (patch) | |
tree | f987e6179652e323dedbf605c700067b6d08249f /dist | |
parent | 4b8dc9635c6e5db9d8bb205ff22defccd660530f (diff) | |
download | mongo-bd0f24b3d6f95a05eba3c08bf817eb7e7d26675d.tar.gz |
WT-2060: Replace remaining uses of no_aggregate with max_aggregate and
remove support for no_aggregate; in the remaining no_aggregate fields
(btree_fixed_len, allocation_size, block_magic, block_major, and
block_minor), the maximum value is at least as good as the last one we
find (and in some cases, such as the file allocation size, arguably
better). The reason is because no_aggregate simply read from slot 0, and
that assumes there's a WT_STAT_XXX_SET call in the code that updates
this sp ecific statistic, and we have no way to enforce that, so don't
try. This will be marginally slower because we're checking more fields
on statistics calls, but I can't imagine it will matter.
Diffstat (limited to 'dist')
-rw-r--r-- | dist/stat.py | 8 | ||||
-rw-r--r-- | dist/stat_data.py | 13 |
2 files changed, 7 insertions, 14 deletions
diff --git a/dist/stat.py b/dist/stat.py index d62fda3fcb9..de9c58add46 100644 --- a/dist/stat.py +++ b/dist/stat.py @@ -171,9 +171,7 @@ __wt_stat_''' + name + '''_aggregate_single( { ''') for l in sorted(list): - if 'no_aggregate' in l.flags: - o = '\tto->' + l.name + ' = from->' + l.name + ';\n' - elif 'max_aggregate' in l.flags: + if 'max_aggregate' in l.flags: o = '\tif (from->' + l.name + ' > to->' + l.name + ')\n' +\ '\t\tto->' + l.name + ' = from->' + l.name + ';\n' else: @@ -197,9 +195,7 @@ __wt_stat_''' + name + '''_aggregate( f.write('\tint64_t v;\n\n') break; for l in sorted(list): - if 'no_aggregate' in l.flags: - o = '\tto->' + l.name + ' = from[0]->' + l.name + ';\n' - elif 'max_aggregate' in l.flags: + if 'max_aggregate' in l.flags: o = '\tif ((v = WT_STAT_READ(from, ' + l.name + ')) >\n' +\ '\t to->' + l.name + ')\n' +\ '\t\tto->' + l.name + ' = v;\n' diff --git a/dist/stat_data.py b/dist/stat_data.py index 0d5ce29ee1f..41a93961079 100644 --- a/dist/stat_data.py +++ b/dist/stat_data.py @@ -9,10 +9,7 @@ # # Data-source statistics are normally aggregated across the set of underlying # objects. Additional optional configuration flags are available: -# no_aggregate Ignore the value when aggregating statistics # max_aggregate Take the maximum value when aggregating statistics -# -# Optional configuration flags: # no_clear Value not cleared when statistics cleared # no_scale Don't scale value per second in the logging tool script # @@ -360,7 +357,7 @@ dsrc_stats = [ BtreeStat('btree_column_variable', 'column-store variable-size leaf pages', 'no_scale'), BtreeStat('btree_compact_rewrite', 'pages rewritten by compaction'), BtreeStat('btree_entries', 'number of key/value pairs', 'no_scale'), - BtreeStat('btree_fixed_len', 'fixed-record size', 'no_aggregate,no_scale'), + BtreeStat('btree_fixed_len', 'fixed-record size', 'max_aggregate,no_scale'), BtreeStat('btree_maximum_depth', 'maximum tree depth', 'max_aggregate,no_scale'), BtreeStat('btree_maxintlkey', 'maximum internal page key size', 'max_aggregate,no_scale'), BtreeStat('btree_maxintlpage', 'maximum internal page size', 'max_aggregate,no_scale'), @@ -390,14 +387,14 @@ dsrc_stats = [ ########################################## # Block manager statistics ########################################## - BlockStat('allocation_size', 'file allocation unit size', 'no_aggregate,no_scale'), + BlockStat('allocation_size', 'file allocation unit size', 'max_aggregate,no_scale'), BlockStat('block_alloc', 'blocks allocated'), BlockStat('block_checkpoint_size', 'checkpoint size', 'no_scale'), BlockStat('block_extension', 'allocations requiring file extension'), BlockStat('block_free', 'blocks freed'), - BlockStat('block_magic', 'file magic number', 'no_aggregate,no_scale'), - BlockStat('block_major', 'file major version number', 'no_aggregate,no_scale'), - BlockStat('block_minor', 'minor version number', 'no_aggregate,no_scale'), + BlockStat('block_magic', 'file magic number', 'max_aggregate,no_scale'), + BlockStat('block_major', 'file major version number', 'max_aggregate,no_scale'), + BlockStat('block_minor', 'minor version number', 'max_aggregate,no_scale'), BlockStat('block_reuse_bytes', 'file bytes available for reuse'), BlockStat('block_size', 'file size in bytes', 'no_scale'), |