From 1bb2800fb1bf312689115a7230b1d3ead74d4ac6 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Sun, 20 Feb 2022 21:24:22 +0000 Subject: Use a common FNET_Transport owned by Proton in both SceduledExecutor and TransactionLogServer. This reduces the number of Transport object by 1 per document type and netto 1 in Proton. Each of them contains 2 threads. In addition it uses a common Transport for the RpcFileAcquirer objects used during config fetching. This prevents creating 3 temporary Transport objects on every reconfig. --- searchlib/src/tests/transactionlogstress/translogstress.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'searchlib/src/tests/transactionlogstress/translogstress.cpp') diff --git a/searchlib/src/tests/transactionlogstress/translogstress.cpp b/searchlib/src/tests/transactionlogstress/translogstress.cpp index 6c0f312f0fb..3d8379adba2 100644 --- a/searchlib/src/tests/transactionlogstress/translogstress.cpp +++ b/searchlib/src/tests/transactionlogstress/translogstress.cpp @@ -4,8 +4,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -698,13 +700,13 @@ TransLogStress::Main() } // start transaction log server + FastOS_ThreadPool threadPool(256_Ki); + FNET_Transport transport; DummyFileHeaderContext fileHeaderContext; - TransLogServer tls("server", 17897, ".", fileHeaderContext, DomainConfig().setPartSizeLimit(_cfg.domainPartSize)); + TransLogServer tls(transport, "server", 17897, ".", fileHeaderContext, DomainConfig().setPartSizeLimit(_cfg.domainPartSize)); TransLogClient client(tlsSpec); client.create(domain); - FastOS_ThreadPool threadPool(256000); - BufferGenerator bufferGenerator(_cfg.minStrLen, _cfg.maxStrLen); bufferGenerator.setSeed(_cfg.baseSeed); std::vector buffers; -- cgit v1.2.3