mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-16 10:01:47 +00:00
committed by
Dennis Klein
parent
61d2797971
commit
45663189a9
@@ -102,6 +102,7 @@ auto testConnectedPeers(std::string const& transport)
|
||||
|
||||
ProgOptions config;
|
||||
config.SetProperty<string>("session", tools::Uuid());
|
||||
config.SetProperty<bool>("shm-monitor", true);
|
||||
string const address(tools::ToString("ipc://", config.GetProperty<string>("session")));
|
||||
unsigned long constexpr zero(0), one(1);
|
||||
auto factory(TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config));
|
||||
|
@@ -79,6 +79,7 @@ TEST(MemoryResources, transportAllocatorMap)
|
||||
size_t session{tools::UuidHash()};
|
||||
ProgOptions config;
|
||||
config.SetProperty<string>("session", to_string(session));
|
||||
config.SetProperty<bool>("shm-monitor", true);
|
||||
|
||||
FactoryType factoryZMQ = TransportFactory::CreateTransportFactory("zeromq", fair::mq::tools::Uuid(), &config);
|
||||
FactoryType factorySHM = TransportFactory::CreateTransportFactory("shmem", fair::mq::tools::Uuid(), &config);
|
||||
@@ -129,6 +130,7 @@ TEST(MemoryResources, getMessage)
|
||||
size_t session{tools::UuidHash()};
|
||||
ProgOptions config;
|
||||
config.SetProperty<string>("session", to_string(session));
|
||||
config.SetProperty<bool>("shm-monitor", true);
|
||||
|
||||
FactoryType factoryZMQ = TransportFactory::CreateTransportFactory("zeromq", fair::mq::tools::Uuid(), &config);
|
||||
FactoryType factorySHM = TransportFactory::CreateTransportFactory("shmem", fair::mq::tools::Uuid(), &config);
|
||||
|
@@ -42,6 +42,7 @@ auto RunPushPullWithMsgResize(string const & transport, string const & _address)
|
||||
ProgOptions config;
|
||||
config.SetProperty<string>("session", tools::Uuid());
|
||||
config.SetProperty<size_t>("shm-segment-size", 100000000);
|
||||
config.SetProperty<bool>("shm-monitor", true);
|
||||
auto factory(TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config));
|
||||
|
||||
Channel push{"Push", "push", factory};
|
||||
@@ -104,6 +105,7 @@ auto RunMsgRebuild(const string& transport) -> void
|
||||
ProgOptions config;
|
||||
config.SetProperty<string>("session", tools::Uuid());
|
||||
config.SetProperty<size_t>("shm-segment-size", 100000000);
|
||||
config.SetProperty<bool>("shm-monitor", true);
|
||||
auto factory(TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config));
|
||||
|
||||
size_t const msgSize{100};
|
||||
@@ -137,6 +139,7 @@ auto RunPushPullWithAlignment(string const& transport, string const& _address) -
|
||||
ProgOptions config;
|
||||
config.SetProperty<string>("session", tools::Uuid());
|
||||
config.SetProperty<size_t>("shm-segment-size", 100000000);
|
||||
config.SetProperty<bool>("shm-monitor", true);
|
||||
auto factory(TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config));
|
||||
|
||||
Channel push{"Push", "push", factory};
|
||||
@@ -191,6 +194,7 @@ auto EmptyMessage(string const& transport, string const& _address) -> void
|
||||
ProgOptions config;
|
||||
config.SetProperty<string>("session", tools::Uuid());
|
||||
config.SetProperty<size_t>("shm-segment-size", 100000000);
|
||||
config.SetProperty<bool>("shm-monitor", true);
|
||||
auto factory(TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config));
|
||||
|
||||
Channel push{"Push", "push", factory};
|
||||
@@ -242,6 +246,7 @@ auto ZeroCopy() -> void
|
||||
ProgOptions config;
|
||||
config.SetProperty<string>("session", tools::Uuid());
|
||||
config.SetProperty<size_t>("shm-segment-size", 100000000);
|
||||
config.SetProperty<bool>("shm-monitor", true);
|
||||
auto factory(TransportFactory::CreateTransportFactory("shmem", tools::Uuid(), &config));
|
||||
|
||||
unique_ptr<string> str(make_unique<string>("asdf"));
|
||||
@@ -274,8 +279,10 @@ auto ZeroCopyFromUnmanaged(string const& address) -> void
|
||||
string session(tools::Uuid());
|
||||
config1.SetProperty<string>("session", session);
|
||||
config1.SetProperty<size_t>("shm-segment-size", 100000000);
|
||||
config1.SetProperty<bool>("shm-monitor", true);
|
||||
config2.SetProperty<string>("session", session);
|
||||
config2.SetProperty<size_t>("shm-segment-size", 100000000);
|
||||
config2.SetProperty<bool>("shm-monitor", true);
|
||||
// ref counts should be accessible accross different segments
|
||||
config2.SetProperty<uint16_t>("shm-segment-id", 2);
|
||||
auto factory1(TransportFactory::CreateTransportFactory("shmem", tools::Uuid(), &config1));
|
||||
|
@@ -38,6 +38,7 @@ auto RunPoller(string transport, int pollType) -> void
|
||||
<< " --id pollout_"<< transport
|
||||
<< " --control static"
|
||||
<< " --color false"
|
||||
<< " --shm-monitor true"
|
||||
<< " --session " << session
|
||||
<< " --channel-config name=data1,type=push,method=bind,address=" << data1Address
|
||||
<< " name=data2,type=push,method=bind,address=" << data2Address;
|
||||
@@ -51,6 +52,7 @@ auto RunPoller(string transport, int pollType) -> void
|
||||
<< " --id pollin_" << transport
|
||||
<< " --control static"
|
||||
<< " --color false"
|
||||
<< " --shm-monitor true"
|
||||
<< " --session " << session
|
||||
<< " --poll-type " << pollType
|
||||
<< " --channel-config name=data1,type=pull,method=connect,address=" << data1Address
|
||||
|
@@ -39,6 +39,7 @@ auto RunPair(string transport) -> void
|
||||
cmd << runTestDevice
|
||||
<< " --id pairleft_" << transport
|
||||
<< " --control static"
|
||||
<< " --shm-monitor true"
|
||||
<< " --shm-segment-size 100000000"
|
||||
<< " --session " << session
|
||||
<< " --color false"
|
||||
@@ -52,6 +53,7 @@ auto RunPair(string transport) -> void
|
||||
cmd << runTestDevice
|
||||
<< " --id pairright_" << transport
|
||||
<< " --control static"
|
||||
<< " --shm-monitor true"
|
||||
<< " --shm-segment-size 100000000"
|
||||
<< " --session " << session
|
||||
<< " --color false"
|
||||
|
@@ -34,6 +34,7 @@ auto RunPushPull(string transport) -> void
|
||||
cmd << runTestDevice
|
||||
<< " --id push_" << transport
|
||||
<< " --control static"
|
||||
<< " --shm-monitor true"
|
||||
<< " --shm-segment-size 100000000"
|
||||
<< " --session " << session
|
||||
<< " --color false"
|
||||
@@ -47,6 +48,7 @@ auto RunPushPull(string transport) -> void
|
||||
cmd << runTestDevice
|
||||
<< " --id pull_" << transport
|
||||
<< " --control static"
|
||||
<< " --shm-monitor true"
|
||||
<< " --shm-segment-size 100000000"
|
||||
<< " --session " << session
|
||||
<< " --color false"
|
||||
|
@@ -30,6 +30,7 @@ auto RunSingleThreadedMultipart(string transport, string address1, string addres
|
||||
fair::mq::ProgOptions config;
|
||||
config.SetProperty<string>("session", tools::Uuid());
|
||||
config.SetProperty<size_t>("shm-segment-size", 100000000);
|
||||
config.SetProperty<bool>("shm-monitor", true);
|
||||
|
||||
auto factory = TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config);
|
||||
|
||||
@@ -109,6 +110,7 @@ auto RunMultiThreadedMultipart(string transport, string address1) -> void
|
||||
config.SetProperty<string>("session", tools::Uuid());
|
||||
config.SetProperty<int>("io-threads", 1);
|
||||
config.SetProperty<size_t>("shm-segment-size", 20000000); // NOLINT
|
||||
config.SetProperty<bool>("shm-monitor", true);
|
||||
|
||||
auto factory = TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config);
|
||||
|
||||
|
@@ -34,6 +34,7 @@ auto RunReqRep(string transport) -> void
|
||||
cmd << runTestDevice
|
||||
<< " --id rep_" << transport
|
||||
<< " --control static"
|
||||
<< " --shm-monitor true"
|
||||
<< " --shm-segment-size 100000000"
|
||||
<< " --session " << session
|
||||
<< " --color false"
|
||||
@@ -47,6 +48,7 @@ auto RunReqRep(string transport) -> void
|
||||
cmd << runTestDevice
|
||||
<< " --id req_1" << transport
|
||||
<< " --control static"
|
||||
<< " --shm-monitor true"
|
||||
<< " --shm-segment-size 100000000"
|
||||
<< " --session " << session
|
||||
<< " --color false"
|
||||
@@ -60,6 +62,7 @@ auto RunReqRep(string transport) -> void
|
||||
cmd << runTestDevice
|
||||
<< " --id req_2" << transport
|
||||
<< " --control static"
|
||||
<< " --shm-monitor true"
|
||||
<< " --shm-segment-size 100000000"
|
||||
<< " --session " << session
|
||||
<< " --color false"
|
||||
|
@@ -69,6 +69,7 @@ void RegionsSizeMismatch()
|
||||
ProgOptions config;
|
||||
config.SetProperty<string>("session", to_string(session));
|
||||
config.SetProperty<size_t>("shm-segment-size", 100000000);
|
||||
config.SetProperty<bool>("shm-monitor", true);
|
||||
|
||||
auto factory = TransportFactory::CreateTransportFactory("shmem", tools::Uuid(), &config);
|
||||
|
||||
@@ -92,8 +93,10 @@ void RegionsCache(const string& transport, const string& _address)
|
||||
ProgOptions config2;
|
||||
config1.SetProperty<string>("session", to_string(session1));
|
||||
config1.SetProperty<size_t>("shm-segment-size", 100000000);
|
||||
config1.SetProperty<bool>("shm-monitor", true);
|
||||
config2.SetProperty<string>("session", to_string(session2));
|
||||
config2.SetProperty<size_t>("shm-segment-size", 100000000);
|
||||
config2.SetProperty<bool>("shm-monitor", true);
|
||||
|
||||
auto factory1 = TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config1);
|
||||
auto factory2 = TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config2);
|
||||
@@ -172,9 +175,10 @@ void RegionEventSubscriptions(const string& transport, bool external)
|
||||
ProgOptions config;
|
||||
config.SetProperty<string>("session", to_string(session));
|
||||
config.SetProperty<size_t>("shm-segment-size", sSize);
|
||||
config.SetProperty<bool>("shm-monitor", true);
|
||||
if (external) {
|
||||
config.SetProperty<bool>("shm-no-cleanup", true);
|
||||
config.SetProperty<bool>("shm-monitor", false);
|
||||
// config.SetProperty<bool>("shm-monitor", false);
|
||||
}
|
||||
|
||||
auto factory = TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config);
|
||||
@@ -272,6 +276,7 @@ void RegionCallbacks(const string& transport, const string& _address)
|
||||
ProgOptions config;
|
||||
config.SetProperty<string>("session", to_string(session));
|
||||
config.SetProperty<size_t>("shm-segment-size", sSize);
|
||||
config.SetProperty<bool>("shm-monitor", true);
|
||||
|
||||
auto factory = TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config);
|
||||
|
||||
|
@@ -41,6 +41,7 @@ void RunOptionsTest(const string& transport)
|
||||
{
|
||||
ProgOptions config;
|
||||
config.SetProperty<string>("session", tools::Uuid());
|
||||
config.SetProperty<bool>("shm-monitor", true);
|
||||
config.SetProperty<size_t>("shm-segment-size", 100000000);
|
||||
auto factory = TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config);
|
||||
Channel channel("Push", "push", factory);
|
||||
@@ -75,6 +76,7 @@ void ZeroingAndMlock(const string& transport)
|
||||
config.SetProperty<size_t>("shm-segment-size", 16384); // NOLINT
|
||||
config.SetProperty<bool>("shm-zero-segment", true);
|
||||
config.SetProperty<bool>("shm-mlock-segment", true);
|
||||
config.SetProperty<bool>("shm-monitor", true);
|
||||
|
||||
auto factory = TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config);
|
||||
|
||||
@@ -93,6 +95,7 @@ void ZeroingAndMlockOnCreation(const string& transport)
|
||||
config.SetProperty<size_t>("shm-segment-size", 16384); // NOLINT
|
||||
config.SetProperty<bool>("shm-mlock-segment-on-creation", true);
|
||||
config.SetProperty<bool>("shm-zero-segment-on-creation", true);
|
||||
config.SetProperty<bool>("shm-monitor", true);
|
||||
|
||||
auto factory = TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config);
|
||||
|
||||
|
@@ -26,6 +26,7 @@ void GetFreeMemory()
|
||||
ProgOptions config;
|
||||
string sessionId(to_string(tools::UuidHash()));
|
||||
config.SetProperty<string>("session", sessionId);
|
||||
config.SetProperty<bool>("shm-monitor", true);
|
||||
|
||||
ASSERT_THROW(shmem::Monitor::GetFreeMemory(shmem::SessionId{sessionId}, 0), shmem::Monitor::MonitorError);
|
||||
|
||||
|
@@ -52,6 +52,7 @@ auto RunTransferTimeout(string transport) -> void
|
||||
<< " --control static"
|
||||
<< " --shm-segment-size 100000000"
|
||||
<< " --severity debug"
|
||||
<< " --shm-monitor true"
|
||||
<< " --transport " << transport
|
||||
<< " --session " << session
|
||||
<< " --color false"
|
||||
@@ -75,6 +76,7 @@ void InterruptTransfer(const string& transport, const string& _address)
|
||||
fair::mq::ProgOptions config;
|
||||
config.SetProperty<string>("session", to_string(session));
|
||||
config.SetProperty<size_t>("shm-segment-size", 100000000);
|
||||
config.SetProperty<bool>("shm-monitor", true);
|
||||
|
||||
auto factory = TransportFactory::CreateTransportFactory(transport, Uuid(), &config);
|
||||
|
||||
|
Reference in New Issue
Block a user