summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorPetr Špaček <petr.spacek@nic.cz>2020-08-25 17:01:46 +0200
committerPetr Špaček <petr.spacek@nic.cz>2020-09-07 17:47:46 +0200
commit26382fde0265312245cf2189601ed8b5c5692637 (patch)
tree9c131167b27b7b9177d0b3e858d37e15c87d2d62 /utils
parentgc: verbose mode is now runtime option (diff)
downloadknot-resolver-26382fde0265312245cf2189601ed8b5c5692637.tar.xz
knot-resolver-26382fde0265312245cf2189601ed8b5c5692637.zip
gc: print cache usage in every cycle if in verbose mode
Diffstat (limited to 'utils')
-rw-r--r--utils/cache_gc/kr_cache_gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/cache_gc/kr_cache_gc.c b/utils/cache_gc/kr_cache_gc.c
index ede6bf60..30b03eaf 100644
--- a/utils/cache_gc/kr_cache_gc.c
+++ b/utils/cache_gc/kr_cache_gc.c
@@ -187,7 +187,7 @@ int kr_cache_gc(kr_cache_gc_cfg_t *cfg, kr_cache_gc_state_t **state)
const double db_usage = kr_cdb_lmdb()->usage_percent(db);
const bool large_usage = db_usage >= cfg->cache_max_usage;
- if (cfg->dry_run || large_usage) { // don't print this on every size check
+ if (cfg->dry_run || large_usage || VERBOSE_STATUS) { // don't print this on every size check
printf("Usage: %.2lf%%\n", db_usage);
}
if (cfg->dry_run || !large_usage) {