aboutsummaryrefslogtreecommitdiff
path: root/zenserver/config.cpp
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2021-12-09 16:17:56 +0100
committerPer Larsson <[email protected]>2021-12-09 16:17:56 +0100
commitd9dad00a33657c8759ca3551de4139136d16143b (patch)
tree2757d5fbf6b442766b4d6ea269ba2ca8cbbe537c /zenserver/config.cpp
parentGC default off. (diff)
downloadzen-d9dad00a33657c8759ca3551de4139136d16143b.tar.xz
zen-d9dad00a33657c8759ca3551de4139136d16143b.zip
Added options for Z$ max duration and whether to collect small objects.
Diffstat (limited to 'zenserver/config.cpp')
-rw-r--r--zenserver/config.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/zenserver/config.cpp b/zenserver/config.cpp
index 1cbb84452..8d9339e92 100644
--- a/zenserver/config.cpp
+++ b/zenserver/config.cpp
@@ -279,10 +279,24 @@ ParseCliOptions(int argc, char* argv[], ZenServerOptions& ServerOptions)
options.add_option("gc",
"",
+ "gc-small-objects",
+ "Whether garbage collection is enabled or not.",
+ cxxopts::value<bool>(ServerOptions.GcConfig.CollectSmallObjects)->default_value("false"),
+ "");
+
+ options.add_option("gc",
+ "",
"gc-interval-seconds",
"Garbage collection interval. Default is 1h.",
cxxopts::value<int32_t>(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<int32_t>(ServerOptions.GcConfig.Cache.MaxDurationSeconds)->default_value("86400"),
+ "");
try
{
auto result = options.parse(argc, argv);