#pragma once
+#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
size_t rw_txn_items; // maximum number of deleted records per RW transaction (0 = unlimited)
unsigned long rw_txn_duration; // maximum duration of RW transaction in usecs (0 = unlimited)
unsigned long rw_txn_delay; // waiting time between two RW transactions in usecs
+
+ bool dry_run;
} kr_cache_gc_cfg_t;
printf(" -m <rw_txn_duration(usecs)>\n");
printf(" -w <wait_next_rw_txn(usecs)>\n");
printf(" -t <temporary_memory(MBytes)>\n");
+ printf(" -n (= dry run)\n");
}
int main(int argc, char *argv[])
kr_cache_gc_cfg_t cfg = { 0 };
int o;
- while ((o = getopt(argc, argv, "hc:d:l:m:w:t:")) != -1) {
+ while ((o = getopt(argc, argv, "hnc:d:l:m:w:t:")) != -1) {
switch (o) {
case 'c':
cfg.cache_path = optarg;
cfg.temp_keys_space *= 1048576;
break;
#undef get_nonneg_optarg
+ case 'n':
+ cfg.dry_run = true;
+ break;
case ':':
case '?':
case 'h':