Skip to content

Commit

Permalink
Refactor WsConnection to Host/Client separation and fix required Fram…
Browse files Browse the repository at this point in the history
…eworkLogger examples and benchmarks
  • Loading branch information
Oipo committed Nov 9, 2024
1 parent 4a99fb7 commit 6f1f5a0
Show file tree
Hide file tree
Showing 24 changed files with 144 additions and 72 deletions.
3 changes: 3 additions & 0 deletions benchmarks/coroutine_benchmark/ichor_coroutine_benchmark.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "TestService.h"
#include <ichor/event_queues/PriorityQueue.h>
#include <ichor/services/logging/LoggerFactory.h>
#include <ichor/services/logging/NullFrameworkLogger.h>
#include <ichor/services/logging/NullLogger.h>
#include <ichor/services/metrics/MemoryUsageFunctions.h>
#include <ichor/ichor-mimalloc.h>
Expand Down Expand Up @@ -39,6 +40,7 @@ int main(int argc, char *argv[]) {
auto queue = std::make_unique<PriorityQueue>();
auto &dm = queue->createManager();
dm.createServiceManager<LoggerFactory<NullLogger>, ILoggerFactory>();
dm.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
dm.createServiceManager<TestService>(Properties{{"LogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_WARN)}});
queue->start(CaptureSigInt);
auto end = std::chrono::steady_clock::now();
Expand All @@ -54,6 +56,7 @@ int main(int argc, char *argv[]) {
threads[i] = std::thread([&queues, i] {
auto &dm = queues[i].createManager();
dm.createServiceManager<LoggerFactory<NullLogger>, ILoggerFactory>();
dm.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
dm.createServiceManager<TestService>(Properties{{"LogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_WARN)}});
queues[i].start(CaptureSigInt);
});
Expand Down
3 changes: 3 additions & 0 deletions benchmarks/event_benchmark/ichor_event_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <ichor/event_queues/IOUringQueue.h>
#endif
#include <ichor/services/logging/LoggerFactory.h>
#include <ichor/services/logging/NullFrameworkLogger.h>
#include <ichor/services/logging/NullLogger.h>
#include <ichor/services/metrics/MemoryUsageFunctions.h>
#include <ichor/ichor-mimalloc.h>
Expand Down Expand Up @@ -63,6 +64,7 @@ int main(int argc, char *argv[]) {
// spdlog::info("start");
auto &dm = queue->createManager();
dm.createServiceManager<LoggerFactory<NullLogger>, ILoggerFactory>();
dm.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
dm.createServiceManager<TestService>(Properties{{"LogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_WARN)}});
queue->start(CaptureSigInt);
auto end = std::chrono::steady_clock::now();
Expand Down Expand Up @@ -91,6 +93,7 @@ int main(int argc, char *argv[]) {
}
auto &dm = queue->createManager();
dm.createServiceManager<LoggerFactory<NullLogger>, ILoggerFactory>();
dm.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
dm.createServiceManager<TestService>(Properties{{"LogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_WARN)}});
queue->start(CaptureSigInt);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <ichor/services/logging/LoggerFactory.h>
#include <ichor/services/serialization/ISerializer.h>
#include <ichor/services/logging/NullLogger.h>
#include <ichor/services/logging/NullFrameworkLogger.h>
#include <ichor/services/metrics/MemoryUsageFunctions.h>
#include <ichor/ichor-mimalloc.h>
#include <iostream>
Expand Down Expand Up @@ -43,6 +44,7 @@ int main(int argc, char *argv[]) {
auto queue = std::make_unique<PriorityQueue>();
auto &dm = queue->createManager();
dm.createServiceManager<LoggerFactory<NullLogger>, ILoggerFactory>();
dm.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
dm.createServiceManager<TestMsgGlazeSerializer, ISerializer<TestMsg>>();
dm.createServiceManager<TestService>();
queue->start(CaptureSigInt);
Expand All @@ -59,6 +61,7 @@ int main(int argc, char *argv[]) {
threads[i] = std::thread([&queues, i] {
auto &dm = queues[i].createManager();
dm.createServiceManager<LoggerFactory<NullLogger>, ILoggerFactory>();
dm.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
dm.createServiceManager<TestMsgGlazeSerializer, ISerializer<TestMsg>>();
dm.createServiceManager<TestService>();
queues[i].start(CaptureSigInt);
Expand Down
5 changes: 5 additions & 0 deletions benchmarks/start_benchmark/ichor_start_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <ichor/event_queues/PriorityQueue.h>
#include <ichor/services/logging/LoggerFactory.h>
#include <ichor/services/logging/NullLogger.h>
#include <ichor/services/logging/NullFrameworkLogger.h>
#include <ichor/services/metrics/MemoryUsageFunctions.h>
#include <ichor/ichor-mimalloc.h>
#include <iostream>
Expand Down Expand Up @@ -50,6 +51,7 @@ int main(int argc, char *argv[]) {
auto queue = std::make_unique<PriorityQueue>();
auto &dm = queue->createManager();
dm.createServiceManager<LoggerFactory<NullLogger>, ILoggerFactory>();
dm.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
for (uint64_t i = 0; i < SERVICES_COUNT; i++) {
dm.createServiceManager<TestService>(Properties{{"Iteration", Ichor::make_any<uint64_t>(i)},
{"LogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_WARN)}});
Expand All @@ -67,6 +69,7 @@ int main(int argc, char *argv[]) {
threads[i] = std::thread([&queues, i] {
auto &dm = queues[i].createManager();
dm.createServiceManager<LoggerFactory<NullLogger>, ILoggerFactory>();
dm.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
for (uint64_t z = 0; z < SERVICES_COUNT; z++) {
dm.createServiceManager<TestService>(Properties{{"Iteration", Ichor::make_any<uint64_t>(z)}, {"LogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_WARN)}});
}
Expand All @@ -88,6 +91,7 @@ int main(int argc, char *argv[]) {
auto queue = std::make_unique<PriorityQueue>();
auto &dm = queue->createManager();
dm.createServiceManager<LoggerFactory<NullLogger>, ILoggerFactory>();
dm.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
for (uint64_t i = 0; i < SERVICES_COUNT; i++) {
dm.createServiceManager<ConstructorInjectionTestService>(Properties{{"Iteration", Ichor::make_any<uint64_t>(i)},
{"LogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_WARN)}});
Expand All @@ -105,6 +109,7 @@ int main(int argc, char *argv[]) {
threads[i] = std::thread([&queues, i] {
auto &dm = queues[i].createManager();
dm.createServiceManager<LoggerFactory<NullLogger>, ILoggerFactory>();
dm.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
for (uint64_t z = 0; z < SERVICES_COUNT; z++) {
dm.createServiceManager<ConstructorInjectionTestService>(Properties{{"Iteration", Ichor::make_any<uint64_t>(z)}, {"LogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_WARN)}});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <ichor/event_queues/PriorityQueue.h>
#include <ichor/services/logging/LoggerFactory.h>
#include <ichor/services/logging/NullLogger.h>
#include <ichor/services/logging/NullFrameworkLogger.h>
#include <ichor/services/metrics/MemoryUsageFunctions.h>
#include <ichor/ichor-mimalloc.h>
#include <iostream>
Expand Down Expand Up @@ -39,6 +40,7 @@ int main(int argc, char *argv[]) {
auto queue = std::make_unique<PriorityQueue>();
auto &dm = queue->createManager();
dm.createServiceManager<LoggerFactory<NullLogger>, ILoggerFactory>();
dm.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
dm.createServiceManager<TestService, ITestService>(Properties{{"LogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_INFO)}});
dm.createServiceManager<StartStopService>(Properties{{"LogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_INFO)}});
queue->start(CaptureSigInt);
Expand All @@ -55,6 +57,7 @@ int main(int argc, char *argv[]) {
threads[i] = std::thread([&queues, i] {
auto &dm = queues[i].createManager();
dm.createServiceManager<LoggerFactory<NullLogger>, ILoggerFactory>();
dm.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
dm.createServiceManager<TestService, ITestService>(Properties{{"LogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_INFO)}});
dm.createServiceManager<StartStopService>(Properties{{"LogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_INFO)}});
queues[i].start(CaptureSigInt);
Expand Down
2 changes: 2 additions & 0 deletions examples/etcd_example/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "UsingEtcdService.h"
#include <ichor/event_queues/PriorityQueue.h>
#include <ichor/services/logging/LoggerFactory.h>
#include <ichor/services/logging/NullFrameworkLogger.h>
#include <ichor/services/etcd/EtcdV2Service.h>
#include <ichor/services/timer/TimerFactoryFactory.h>
#include <ichor/services/network/boost/HttpConnectionService.h>
Expand Down Expand Up @@ -35,6 +36,7 @@ int main(int argc, char *argv[]) {
#ifdef ICHOR_USE_SPDLOG
dm.createServiceManager<SpdlogSharedService, ISpdlogSharedService>();
#endif
dm.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
dm.createServiceManager<LoggerFactory<LOGGER_TYPE>, ILoggerFactory>(Properties{{"DefaultLogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_INFO)}});
dm.createServiceManager<Etcd::v2::EtcdService, Etcd::v2::IEtcd>(Properties{{"Address", Ichor::make_any<std::string>("127.0.0.1")}, {"Port", Ichor::make_any<uint16_t>(static_cast<uint16_t>(2379))}, {"TimeoutMs", Ichor::make_any<uint64_t>(1'000ul)}});
dm.createServiceManager<UsingEtcdV2Service>();
Expand Down
2 changes: 2 additions & 0 deletions examples/event_statistics_example/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <ichor/event_queues/PriorityQueue.h>
#include <ichor/services/logging/LoggerFactory.h>
#include <ichor/services/logging/NullFrameworkLogger.h>
#include <ichor/services/metrics/EventStatisticsService.h>
#include <ichor/services/timer/TimerFactoryFactory.h>
#include <ichor/ichor-mimalloc.h>
Expand Down Expand Up @@ -36,6 +37,7 @@ int main(int argc, char *argv[]) {
#ifdef ICHOR_USE_SPDLOG
dm.createServiceManager<SpdlogSharedService, ISpdlogSharedService>(Properties{}, priorityToEnsureStartingFirst);
#endif
dm.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
dm.createServiceManager<LoggerFactory<LOGGER_TYPE>, ILoggerFactory>(Properties{{"DefaultLogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_INFO)}}, priorityToEnsureStartingFirst);
dm.createServiceManager<EventStatisticsService, IEventStatisticsService>(Properties{{"ShowStatisticsOnStop", make_any<bool>(true)}}, priorityToEnsureStartingFirst);
dm.createServiceManager<UsingStatisticsService>();
Expand Down
2 changes: 2 additions & 0 deletions examples/factory_example/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "RuntimeCreatedService.h"
#include <ichor/event_queues/PriorityQueue.h>
#include <ichor/services/logging/LoggerFactory.h>
#include <ichor/services/logging/NullFrameworkLogger.h>
#include <ichor/ichor-mimalloc.h>

// Some compile time logic to instantiate a regular cout logger or to use the spdlog logger, if Ichor has been compiled with it.
Expand Down Expand Up @@ -32,6 +33,7 @@ int main(int argc, char *argv[]) {
#ifdef ICHOR_USE_SPDLOG
dm.createServiceManager<SpdlogSharedService, ISpdlogSharedService>();
#endif
dm.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
dm.createServiceManager<LoggerFactory<LOGGER_TYPE>, ILoggerFactory>(Properties{{"DefaultLogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_INFO)}});
dm.createServiceManager<TestService>(Properties{{"scope", Ichor::make_any<std::string>("one"s)}});
dm.createServiceManager<TestService>(Properties{{"scope", Ichor::make_any<std::string>("two"s)}});
Expand Down
4 changes: 1 addition & 3 deletions examples/http_example/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ int main(int argc, char *argv[]) {
dm.createServiceManager<SpdlogSharedService, ISpdlogSharedService>();
#endif

if(verbosity > 0) {
dm.createServiceManager<FRAMEWORK_LOGGER_TYPE, IFrameworkLogger>(Properties{{"LogLevel", Ichor::make_any<LogLevel>(level)}});
}
dm.createServiceManager<FRAMEWORK_LOGGER_TYPE, IFrameworkLogger>(Properties{{"LogLevel", Ichor::make_any<LogLevel>(level)}});

if(silent) {
dm.createServiceManager<LoggerFactory<NullLogger>, ILoggerFactory>();
Expand Down
2 changes: 2 additions & 0 deletions examples/introspection_example/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <ichor/event_queues/PriorityQueue.h>
#include <ichor/services/logging/LoggerFactory.h>
#include <ichor/services/logging/NullFrameworkLogger.h>
#include <ichor/services/timer/TimerFactoryFactory.h>
#include <ichor/ichor-mimalloc.h>
#include "IntrospectionService.h"
Expand Down Expand Up @@ -32,6 +33,7 @@ int main(int argc, char *argv[]) {
#ifdef ICHOR_USE_SPDLOG
dm.createServiceManager<SpdlogSharedService, ISpdlogSharedService>();
#endif
dm.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
dm.createServiceManager<LoggerFactory<LOGGER_TYPE>, ILoggerFactory>(Properties{{"DefaultLogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_INFO)}});
dm.createServiceManager<TimerFactoryFactory>();
dm.createServiceManager<IntrospectionService>();
Expand Down
3 changes: 3 additions & 0 deletions examples/multithreaded_example/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "OtherService.h"
#include <ichor/event_queues/PriorityQueue.h>
#include <ichor/services/logging/LoggerFactory.h>
#include <ichor/services/logging/NullFrameworkLogger.h>
#include <ichor/ichor-mimalloc.h>

// Some compile time logic to instantiate a regular cout logger or to use the spdlog logger, if Ichor has been compiled with it.
Expand Down Expand Up @@ -39,6 +40,7 @@ int main(int argc, char *argv[]) {
#ifdef ICHOR_USE_SPDLOG
dmOne.createServiceManager<SpdlogSharedService, ISpdlogSharedService>();
#endif
dmOne.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
dmOne.createServiceManager<LoggerFactory<LOGGER_TYPE>, ILoggerFactory>(Properties{{"DefaultLogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_INFO)}});
dmOne.createServiceManager<OneService>();
queueOne->start(CaptureSigInt);
Expand All @@ -48,6 +50,7 @@ int main(int argc, char *argv[]) {
#ifdef ICHOR_USE_SPDLOG
dmTwo.createServiceManager<SpdlogSharedService, ISpdlogSharedService>();
#endif
dmTwo.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
dmTwo.createServiceManager<LoggerFactory<LOGGER_TYPE>, ILoggerFactory>(Properties{{"DefaultLogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_INFO)}});
dmTwo.createServiceManager<OtherService>();
queueTwo->start(CaptureSigInt);
Expand Down
2 changes: 2 additions & 0 deletions examples/optional_dependency_example/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "OptionalService.h"
#include <ichor/event_queues/PriorityQueue.h>
#include <ichor/services/logging/LoggerFactory.h>
#include <ichor/services/logging/NullFrameworkLogger.h>
#include <ichor/ichor-mimalloc.h>

// Some compile time logic to instantiate a regular cout logger or to use the spdlog logger, if Ichor has been compiled with it.
Expand Down Expand Up @@ -31,6 +32,7 @@ int main(int argc, char *argv[]) {
#ifdef ICHOR_USE_SPDLOG
dm.createServiceManager<SpdlogSharedService, ISpdlogSharedService>();
#endif
dm.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
dm.createServiceManager<LoggerFactory<LOGGER_TYPE>, ILoggerFactory>(Properties{{"DefaultLogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_INFO)}});
dm.createServiceManager<OptionalService, IOptionalService>();
dm.createServiceManager<OptionalService, IOptionalService>();
Expand Down
2 changes: 2 additions & 0 deletions examples/realtime_example/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "OptionalService.h"
#include <ichor/event_queues/PriorityQueue.h>
#include <ichor/services/logging/LoggerFactory.h>
#include <ichor/services/logging/NullFrameworkLogger.h>
#include <ichor/ichor-mimalloc.h>
#include "GlobalRealtimeSettings.h"

Expand Down Expand Up @@ -37,6 +38,7 @@ void* run_example(void*) {
{
auto queue = std::make_unique<PriorityQueue>();
auto &dm = queue->createManager();
dm.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
dm.createServiceManager<LoggerFactory<LOGGER_TYPE>, ILoggerFactory>(Properties{{"DefaultLogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_INFO)}});
dm.createServiceManager<OptionalService, IOptionalService>();
dm.createServiceManager<OptionalService, IOptionalService>();
Expand Down
2 changes: 2 additions & 0 deletions examples/serializer_example/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "../common/TestMsgGlazeSerializer.h"
#include <ichor/event_queues/PriorityQueue.h>
#include <ichor/services/logging/LoggerFactory.h>
#include <ichor/services/logging/NullFrameworkLogger.h>
#include <ichor/services/serialization/ISerializer.h>
#include <ichor/ichor-mimalloc.h>

Expand Down Expand Up @@ -30,6 +31,7 @@ int main(int argc, char *argv[]) {
#ifdef ICHOR_USE_SPDLOG
dm.createServiceManager<SpdlogSharedService, ISpdlogSharedService>();
#endif
dm.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
dm.createServiceManager<LoggerFactory<LOGGER_TYPE>, ILoggerFactory>(Properties{{"DefaultLogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_INFO)}});
dm.createServiceManager<TestMsgGlazeSerializer, ISerializer<TestMsg>>();
dm.createServiceManager<TestService>();
Expand Down
2 changes: 1 addition & 1 deletion examples/tcp_example/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ int main(int argc, char *argv[]) {
#ifdef ICHOR_USE_SPDLOG
dm.createServiceManager<SpdlogSharedService, ISpdlogSharedService>(Properties{}, priorityToEnsureHostStartingFirst);
#endif
// dm.createServiceManager<FRAMEWORK_LOGGER_TYPE, IFrameworkLogger>(Properties{{"LogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_TRACE)}});
dm.createServiceManager<FRAMEWORK_LOGGER_TYPE, IFrameworkLogger>(Properties{{"LogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_TRACE)}});
dm.createServiceManager<LoggerFactory<LOGGER_TYPE>, ILoggerFactory>(Properties{{"DefaultLogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_TRACE)}}, priorityToEnsureHostStartingFirst);
dm.createServiceManager<TestMsgGlazeSerializer, ISerializer<TestMsg>>();
dm.createServiceManager<HOSTIMPL, IHostService>(Properties{{"Address", Ichor::make_any<std::string>("127.0.0.1"s)}, {"Port", Ichor::make_any<uint16_t>(static_cast<uint16_t>(8001))}}, priorityToEnsureHostStartingFirst);
Expand Down
2 changes: 2 additions & 0 deletions examples/timer_example/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "UsingTimerService.h"
#include <ichor/services/logging/LoggerFactory.h>
#include <ichor/services/logging/NullFrameworkLogger.h>
#include <ichor/ichor-mimalloc.h>

// Some compile time logic to instantiate a regular cout logger or to use the spdlog logger, if Ichor has been compiled with it.
Expand Down Expand Up @@ -49,6 +50,7 @@ int main(int argc, char *argv[]) {
#ifdef ICHOR_USE_SPDLOG
dm.createServiceManager<SpdlogSharedService, ISpdlogSharedService>();
#endif
dm.createServiceManager<NullFrameworkLogger, IFrameworkLogger>();
dm.createServiceManager<LoggerFactory<LOGGER_TYPE>, ILoggerFactory>(Properties{{"DefaultLogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_INFO)}});
dm.createServiceManager<UsingTimerService>();
dm.createServiceManager<TFFIMPL>();
Expand Down
6 changes: 2 additions & 4 deletions examples/websocket_example/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ int main(int argc, char *argv[]) {
dm.createServiceManager<SpdlogSharedService, ISpdlogSharedService>(Properties{}, priorityToEnsureHostStartingFirst);
#endif

if(verbosity > 0) {
dm.createServiceManager<FRAMEWORK_LOGGER_TYPE, IFrameworkLogger>(Properties{{"LogLevel", Ichor::make_any<LogLevel>(level)}}, priorityToEnsureHostStartingFirst);
}
dm.createServiceManager<FRAMEWORK_LOGGER_TYPE, IFrameworkLogger>(Properties{{"LogLevel", Ichor::make_any<LogLevel>(level)}}, priorityToEnsureHostStartingFirst);

if(silent) {
dm.createServiceManager<LoggerFactory<NullLogger>, ILoggerFactory>(Properties{}, priorityToEnsureHostStartingFirst);
Expand All @@ -91,7 +89,7 @@ int main(int argc, char *argv[]) {
dm.createServiceManager<TestMsgGlazeSerializer, ISerializer<TestMsg>>();
dm.createServiceManager<Boost::AsioContextService, Boost::IAsioContextService>(Properties{{"Threads", Ichor::make_any<uint64_t>(threads)}});
dm.createServiceManager<Boost::WsHostService, IHostService>(Properties{{"Address", Ichor::make_any<std::string>(address)}, {"Port", Ichor::make_any<uint16_t>(static_cast<uint16_t>(8001))}}, priorityToEnsureHostStartingFirst);
dm.createServiceManager<ClientFactory<Boost::WsConnectionService>, IClientFactory>();
dm.createServiceManager<ClientFactory<Boost::WsConnectionService<IConnectionService>>, IClientFactory>();
dm.createServiceManager<UsingWsService>(Properties{{"Address", Ichor::make_any<std::string>(address)}, {"Port", Ichor::make_any<uint16_t>(static_cast<uint16_t>(8001))}});
queue->start(CaptureSigInt);
auto end = std::chrono::steady_clock::now();
Expand Down
Loading

0 comments on commit 6f1f5a0

Please sign in to comment.