From d9dad00a33657c8759ca3551de4139136d16143b Mon Sep 17 00:00:00 2001 From: Per Larsson Date: Thu, 9 Dec 2021 16:17:56 +0100 Subject: Added options for Z$ max duration and whether to collect small objects. --- zenserver/config.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'zenserver/config.cpp') diff --git a/zenserver/config.cpp b/zenserver/config.cpp index 1cbb84452..8d9339e92 100644 --- a/zenserver/config.cpp +++ b/zenserver/config.cpp @@ -277,12 +277,26 @@ ParseCliOptions(int argc, char* argv[], ZenServerOptions& ServerOptions) cxxopts::value(ServerOptions.GcConfig.Enabled)->default_value("false"), ""); + options.add_option("gc", + "", + "gc-small-objects", + "Whether garbage collection is enabled or not.", + cxxopts::value(ServerOptions.GcConfig.CollectSmallObjects)->default_value("false"), + ""); + options.add_option("gc", "", "gc-interval-seconds", "Garbage collection interval. Default is 1h.", cxxopts::value(ServerOptions.GcConfig.IntervalSeconds)->default_value("3600"), ""); + + options.add_option("gc", + "", + "gc-cache-duration-seconds", + "Max duration in seconds before Z$ entries get evicted.", + cxxopts::value(ServerOptions.GcConfig.Cache.MaxDurationSeconds)->default_value("86400"), + ""); try { auto result = options.parse(argc, argv); -- cgit v1.2.3