summaryrefslogtreecommitdiff
path: root/src/conn/conn_cache.c
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2015-01-23 15:26:24 -0500
committerKeith Bostic <keith@wiredtiger.com>2015-01-23 15:26:24 -0500
commit271db862ec94d824553e41654303edc0f203fc91 (patch)
tree2d367a193ea13ed0a452885cf12832d685b01033 /src/conn/conn_cache.c
parentb4c655ca0ba6a1e9f583f522833f45e9a3c42043 (diff)
downloadmongo-271db862ec94d824553e41654303edc0f203fc91.tar.gz
Clean up statistics -- leave cache_bytes_max alone, create a new
statistic that reports the adjusted bytes.
Diffstat (limited to 'src/conn/conn_cache.c')
-rw-r--r--src/conn/conn_cache.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/conn/conn_cache.c b/src/conn/conn_cache.c
index 53e1fb483f2..3326c6dd708 100644
--- a/src/conn/conn_cache.c
+++ b/src/conn/conn_cache.c
@@ -28,7 +28,7 @@ __wt_cache_config(WT_SESSION_IMPL *session, const char *cfg[])
*/
if (!F_ISSET(conn, WT_CONN_CACHE_POOL)) {
WT_RET(__wt_config_gets(session, cfg, "cache_size", &cval));
- conn->cache_size = (uint64_t)cval.val;
+ conn->cache_bytes_max = conn->cache_size = (uint64_t)cval.val;
WT_RET(__wt_config_gets(session, cfg, "cache_overhead", &cval));
conn->cache_overhead = (int)cval.val;
if (cval.val != 0)
@@ -145,8 +145,10 @@ __wt_cache_stats_update(WT_SESSION_IMPL *session)
cache = conn->cache;
stats = &conn->stats;
- WT_STAT_SET(stats, cache_bytes_max, conn->cache_size);
+ WT_STAT_SET(stats, cache_bytes_max, conn->cache_bytes_max);
+ WT_STAT_SET(stats, cache_bytes_max_adjusted, conn->cache_size);
WT_STAT_SET(stats, cache_bytes_inuse, __wt_cache_bytes_inuse(cache));
+
WT_STAT_SET(stats, cache_overhead, conn->cache_overhead);
WT_STAT_SET(stats, cache_pages_inuse, __wt_cache_pages_inuse(cache));
WT_STAT_SET(stats, cache_bytes_dirty, cache->bytes_dirty);