diff options
author | Sulabh Mahajan <sulabh.mahajan@mongodb.com> | 2016-09-14 13:20:11 +1000 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2016-09-14 13:20:11 +1000 |
commit | e189aa8a3de76fcd71a4dea254a24f02c80dfa19 (patch) | |
tree | 95ac2381de6c51b15ffa85e203be605e65b3ed72 /src/txn/txn_ckpt.c | |
parent | 71c8bd736c888228d42d9a2ee478380d2224c984 (diff) | |
download | mongo-e189aa8a3de76fcd71a4dea254a24f02c80dfa19.tar.gz |
WT-2859 Restructure statistics gathering macros (#3016)
Having _FAST_ macros gives an impression that when we use them,
we are collecting fast statistics only, which is not true.
Except when statistics=none is set, we collect all the stats.
This change removes _FAST_ macros and modifies the basic macros
to only collect stats when statistics=none is not set.
Diffstat (limited to 'src/txn/txn_ckpt.c')
-rw-r--r-- | src/txn/txn_ckpt.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/txn/txn_ckpt.c b/src/txn/txn_ckpt.c index 91cee92b862..180a06a3aed 100644 --- a/src/txn/txn_ckpt.c +++ b/src/txn/txn_ckpt.c @@ -306,7 +306,7 @@ __checkpoint_update_generation(WT_SESSION_IMPL *session) WT_PUBLISH(btree->checkpoint_gen, S2C(session)->txn_global.checkpoint_gen); - WT_STAT_FAST_DATA_SET(session, + WT_STAT_DATA_SET(session, btree_checkpoint_generation, btree->checkpoint_gen); } @@ -424,14 +424,14 @@ __checkpoint_reduce_dirty_cache(WT_SESSION_IMPL *session) */ __wt_sleep(0, 10 * stepdown_us); cache->eviction_scrub_limit = current_dirty - delta; - WT_STAT_FAST_CONN_SET(session, txn_checkpoint_scrub_target, + WT_STAT_CONN_SET(session, txn_checkpoint_scrub_target, cache->eviction_scrub_limit); WT_RET(__wt_epoch(session, &last)); } WT_RET(__wt_epoch(session, &stop)); total_ms = WT_TIMEDIFF_MS(stop, start); - WT_STAT_FAST_CONN_SET(session, txn_checkpoint_scrub_time, total_ms); + WT_STAT_CONN_SET(session, txn_checkpoint_scrub_time, total_ms); return (0); } @@ -619,7 +619,7 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[]) * ignore the checkpoint's transaction. */ (void)__wt_atomic_addv64(&txn_global->checkpoint_gen, 1); - WT_STAT_FAST_CONN_SET(session, + WT_STAT_CONN_SET(session, txn_checkpoint_generation, txn_global->checkpoint_gen); /* Keep track of handles acquired for locking. */ @@ -705,7 +705,7 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[]) * after this point are too new to be written in the checkpoint. */ cache->eviction_scrub_limit = 0.0; - WT_STAT_FAST_CONN_SET(session, txn_checkpoint_scrub_target, 0); + WT_STAT_CONN_SET(session, txn_checkpoint_scrub_target, 0); /* * Mark old checkpoints that are being deleted and figure out which @@ -749,8 +749,8 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[]) WT_ERR(__checkpoint_apply(session, cfg, __wt_checkpoint_sync)); WT_ERR(__wt_epoch(session, &fsync_stop)); fsync_duration_usecs = WT_TIMEDIFF_US(fsync_stop, fsync_start); - WT_STAT_FAST_CONN_INCR(session, txn_checkpoint_fsync_post); - WT_STAT_FAST_CONN_SET(session, + WT_STAT_CONN_INCR(session, txn_checkpoint_fsync_post); + WT_STAT_CONN_SET(session, txn_checkpoint_fsync_post_duration, fsync_duration_usecs); WT_ERR(__checkpoint_verbose_track(session, @@ -829,7 +829,7 @@ err: /* WT_TRET(__wt_meta_track_off(session, false, ret != 0)); cache->eviction_scrub_limit = 0.0; - WT_STAT_FAST_CONN_SET(session, txn_checkpoint_scrub_target, 0); + WT_STAT_CONN_SET(session, txn_checkpoint_scrub_target, 0); if (F_ISSET(txn, WT_TXN_RUNNING)) { /* @@ -903,12 +903,12 @@ __wt_txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[]) * calls checkpoint directly, it can be tough to avoid. Serialize here * to ensure we don't get into trouble. */ - WT_STAT_FAST_CONN_SET(session, txn_checkpoint_running, 1); + WT_STAT_CONN_SET(session, txn_checkpoint_running, 1); WT_WITH_CHECKPOINT_LOCK(session, ret, ret = __txn_checkpoint(session, cfg)); - WT_STAT_FAST_CONN_SET(session, txn_checkpoint_running, 0); + WT_STAT_CONN_SET(session, txn_checkpoint_running, 0); F_CLR(session, WT_SESSION_CAN_WAIT | WT_SESSION_NO_EVICTION); |