From 37edbbd4437bd756236d99684ac4d7b0b6725aa8 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Fri, 20 May 2022 13:13:09 +0200 Subject: Automatically create namespaces on requests (if enabled via configuration) --- zenserver/zenserver.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'zenserver/zenserver.cpp') diff --git a/zenserver/zenserver.cpp b/zenserver/zenserver.cpp index 9e6c67d34..b965a9bf3 100644 --- a/zenserver/zenserver.cpp +++ b/zenserver/zenserver.cpp @@ -755,7 +755,9 @@ ZenServer::InitializeStructuredCache(const ZenServerOptions& ServerOptions) using namespace std::literals; ZEN_INFO("instantiating structured cache service"); - m_CacheStore = std::make_unique(m_CasGc, m_DataRoot / "cache"); + m_CacheStore = std::make_unique( + m_CasGc, + ZenCacheStore::Configuration{.BasePath = m_DataRoot / "cache", .AllowAutomaticCreationOfNamespaces = true}); const ZenUpstreamCacheConfig& UpstreamConfig = ServerOptions.UpstreamCacheConfig; -- cgit v1.2.3 From f0d389a4430b62bfa8ea0852905fcf84065b08c2 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Fri, 20 May 2022 18:45:35 +0200 Subject: Add catch2 support (#101) Added option to use catch2 for unit tests Currently both doctest and catch2 are supported via some compatibility macros. doctest is the default, and ZEN_USE_CATCH2 needs to be defined to switch to catch2. Our goal is to evaluate how well catch2 works and switch to catch2 if everything pans out since UE5 now supports using catch2 for unit tests. --- zenserver/zenserver.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'zenserver/zenserver.cpp') diff --git a/zenserver/zenserver.cpp b/zenserver/zenserver.cpp index 9e6c67d34..05ae4a09a 100644 --- a/zenserver/zenserver.cpp +++ b/zenserver/zenserver.cpp @@ -50,9 +50,8 @@ ZEN_THIRD_PARTY_INCLUDES_END // in some shared code into the executable #if ZEN_WITH_TESTS -# define DOCTEST_CONFIG_IMPLEMENT +# define ZEN_TEST_WITH_RUNNER # include -# undef DOCTEST_CONFIG_IMPLEMENT #endif ////////////////////////////////////////////////////////////////////////// @@ -1162,7 +1161,7 @@ test_main(int argc, char** argv) zen::MaximizeOpenFileCount(); - return doctest::Context(argc, argv).run(); + return ZEN_RUN_TESTS(argc, argv); } #endif -- cgit v1.2.3 From f8d110ad0ebf43bbae18db5bef5c38f3c37f5234 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Wed, 1 Jun 2022 10:23:43 +0200 Subject: Make it possible to configure GC monitoring interval command line: --gc-monitor-interval-seconds lua: monitorintervalseconds --- zenserver/zenserver.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'zenserver/zenserver.cpp') diff --git a/zenserver/zenserver.cpp b/zenserver/zenserver.cpp index a924d9c81..4db69c265 100644 --- a/zenserver/zenserver.cpp +++ b/zenserver/zenserver.cpp @@ -364,6 +364,7 @@ public: ZEN_INFO("initializing GC, enabled '{}', interval {}s", ServerOptions.GcConfig.Enabled, ServerOptions.GcConfig.IntervalSeconds); zen::GcSchedulerConfig GcConfig{ .RootDirectory = m_DataRoot / "gc", + .MonitorInterval = std::chrono::seconds(ServerOptions.GcConfig.MonitorIntervalSeconds), .Interval = std::chrono::seconds(ServerOptions.GcConfig.IntervalSeconds), .MaxCacheDuration = std::chrono::seconds(ServerOptions.GcConfig.Cache.MaxDurationSeconds), .CollectSmallObjects = ServerOptions.GcConfig.CollectSmallObjects, -- cgit v1.2.3