summaryrefslogtreecommitdiff
path: root/src/evict/evict_lru.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/evict/evict_lru.c')
-rw-r--r--src/evict/evict_lru.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/evict/evict_lru.c b/src/evict/evict_lru.c
index 6863533acfb..84c9990832d 100644
--- a/src/evict/evict_lru.c
+++ b/src/evict/evict_lru.c
@@ -934,7 +934,6 @@ __evict_tune_workers(WT_SESSION_IMPL *session)
cache = conn->cache;
WT_ASSERT(session, conn->evict_threads.threads[0]->session == session);
- pgs_evicted_persec_cur = 0;
if (conn->evict_tune_stable)
return (0);
@@ -966,7 +965,8 @@ __evict_tune_workers(WT_SESSION_IMPL *session)
pgs_evicted_persec_cur = (delta_pages * WT_THOUSAND) / delta_msec;
conn->evict_tune_num_points++;
- /* Keep track of the maximum eviction throughput seen and the number
+ /*
+ * Keep track of the maximum eviction throughput seen and the number
* of workers corresponding to that throughput.
*/
if (pgs_evicted_persec_cur > conn->evict_tune_pg_sec_max) {
@@ -2116,6 +2116,7 @@ __wt_cache_eviction_worker(WT_SESSION_IMPL *session, bool busy, u_int pct_full)
WT_TXN_GLOBAL *txn_global;
WT_TXN_STATE *txn_state;
uint64_t init_evict_count, max_pages_evicted;
+ bool timer;
conn = S2C(session);
cache = conn->cache;
@@ -2136,7 +2137,9 @@ __wt_cache_eviction_worker(WT_SESSION_IMPL *session, bool busy, u_int pct_full)
__wt_evict_server_wake(session);
/* Track how long application threads spend doing eviction. */
- if (WT_STAT_ENABLED(session) && !F_ISSET(session, WT_SESSION_INTERNAL))
+ timer =
+ WT_STAT_ENABLED(session) && !F_ISSET(session, WT_SESSION_INTERNAL);
+ if (timer)
__wt_epoch(session, &enter);
for (init_evict_count = cache->pages_evict;; ret = 0) {
@@ -2202,8 +2205,7 @@ __wt_cache_eviction_worker(WT_SESSION_IMPL *session, bool busy, u_int pct_full)
}
}
-err: if (WT_STAT_ENABLED(session) &&
- !F_ISSET(session, WT_SESSION_INTERNAL)) {
+err: if (timer) {
__wt_epoch(session, &leave);
WT_STAT_CONN_INCRV(session,
application_cache_time, WT_TIMEDIFF_US(leave, enter));