Skip to content
Snippets Groups Projects
Commit cd8fea9d authored by Adrien Béraud's avatar Adrien Béraud
Browse files

bench: adapt for new API

Change-Id: I48a3a29d95ca2d56ce55864f3417a1f3d8c1bb57
parent 2f35d7f9
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,7 @@ std::unique_ptr<ConnectionHandler> ...@@ -32,7 +32,7 @@ std::unique_ptr<ConnectionHandler>
setupHandler(const std::string& name, setupHandler(const std::string& name,
std::shared_ptr<asio::io_context> ioContext, std::shared_ptr<asio::io_context> ioContext,
std::shared_ptr<std::thread> ioContextRunner, std::shared_ptr<std::thread> ioContextRunner,
std::unique_ptr<IceTransportFactory>& factory, std::shared_ptr<IceTransportFactory> factory,
std::shared_ptr<Logger> logger) std::shared_ptr<Logger> logger)
{ {
auto h = std::make_unique<ConnectionHandler>(); auto h = std::make_unique<ConnectionHandler>();
...@@ -66,9 +66,9 @@ setupHandler(const std::string& name, ...@@ -66,9 +66,9 @@ setupHandler(const std::string& name,
config->dht = h->dht; config->dht = h->dht;
config->id = h->id; config->id = h->id;
config->ioContext = h->ioContext; config->ioContext = h->ioContext;
config->factory = factory.get(); config->factory = factory;
config->logger = logger; config->logger = logger;
config->certStore = h->certStore.get(); config->certStore = h->certStore;
std::filesystem::path currentPath = std::filesystem::current_path(); std::filesystem::path currentPath = std::filesystem::current_path();
std::filesystem::path tempDirPath = currentPath / "temp"; std::filesystem::path tempDirPath = currentPath / "temp";
...@@ -89,7 +89,7 @@ struct BenchResult { ...@@ -89,7 +89,7 @@ struct BenchResult {
BenchResult BenchResult
runBench(std::shared_ptr<asio::io_context> ioContext, runBench(std::shared_ptr<asio::io_context> ioContext,
std::shared_ptr<std::thread> ioContextRunner, std::shared_ptr<std::thread> ioContextRunner,
std::unique_ptr<IceTransportFactory>& factory, std::shared_ptr<IceTransportFactory>& factory,
std::shared_ptr<Logger> logger) std::shared_ptr<Logger> logger)
{ {
BenchResult ret; BenchResult ret;
...@@ -172,7 +172,7 @@ bench() ...@@ -172,7 +172,7 @@ bench()
{ {
std::shared_ptr<Logger> logger;// = dht::log::getStdLogger(); std::shared_ptr<Logger> logger;// = dht::log::getStdLogger();
auto factory = std::make_unique<IceTransportFactory>(logger); auto factory = std::make_shared<IceTransportFactory>(logger);
auto ioContext = std::make_shared<asio::io_context>(); auto ioContext = std::make_shared<asio::io_context>();
auto ioContextRunner = std::make_shared<std::thread>([context = ioContext]() { auto ioContextRunner = std::make_shared<std::thread>([context = ioContext]() {
try { try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment