("daemon", ": execute sample dedup in daemon mode")
("loop", ": execute sample dedup in a loop until terminated. Sleeps 'wakeup-period' seconds between iterations")
("wakeup-period", po::value<int>(), ": set the wakeup period of crawler thread (sec)")
- ("fpstore-threshold", po::value<int>()->default_value(100_M), ": set max size of in-memory fingerprint store (bytes)")
+ ("fpstore-threshold", po::value<size_t>()->default_value(100_M), ": set max size of in-memory fingerprint store (bytes)")
;
desc.add(op_desc);
return desc;
FpStore(size_t chunk_threshold,
uint32_t report_period,
- ssize_t memory_threshold) :
+ size_t memory_threshold) :
report_period(report_period),
memory_threshold(memory_threshold),
fp_map(chunk_threshold) { }
utime_t next_report;
const uint32_t report_period;
size_t total_bytes = 0;
- const uint64_t memory_threshold;
+ const size_t memory_threshold;
FpMap<std::string, dup_count_t> fp_map;
};
int chunk_threshold,
int sampling_ratio,
uint32_t report_period,
- unsigned fpstore_threshold) :
+ size_t fpstore_threshold) :
fp_store(chunk_threshold, report_period, fpstore_threshold),
sampling_ratio(static_cast<double>(sampling_ratio) / 100) { }
};
cout << "100 second is set as wakeup period by default" << std::endl;
}
- const unsigned fp_threshold = opts["fpstore-threshold"].as<int>();
+ const size_t fp_threshold = opts["fpstore-threshold"].as<size_t>();
std::string fp_algo = get_opts_fp_algo(opts);