Allow easier testing without having to recompile for use of binary/boost/protobuf payload.

to use different data transfer method, just provide a parameter to the script, e.g.:
./startAll bin
./startAll boost
./startAll proto
etc.

if no or incorrect parameters is provided, binary method will be used!
protobuf method works only if the library is available on the system, otherwise it is not compiled.
This commit is contained in:
Alexey Rybalchenko 2014-03-28 12:00:13 +01:00 committed by Florian Uhlig
parent 005321f63c
commit adc7443aa5
2 changed files with 10 additions and 9 deletions

View File

@ -102,7 +102,13 @@ set(LIBRARY_NAME FairMQ)
GENERATE_LIBRARY()
set(Exe_Names bsampler buffer splitter merger sink proxy)
set(Exe_Names
bsampler
buffer
splitter
merger
sink
proxy)
if(PROTOBUF_FOUND)
set(Exe_Names

View File

@ -280,8 +280,6 @@ void FairMQDevice::LogSocketRates()
while ( true ) {
try {
boost::this_thread::sleep(boost::posix_time::milliseconds(fLogIntervalInMs));
t1 = get_timestamp();
timeSinceLastLog_ms = (t1 - t0) / 1000.0L;
@ -314,12 +312,8 @@ void FairMQDevice::LogSocketRates()
i = 0;
for ( vector<FairMQSocket*>::iterator itr = fPayloadOutputs->begin(); itr != fPayloadOutputs->end(); itr++ ) {
// #ifdef NANOMSG
// LOG(ERROR) << "OK THEN";
// #endif
for ( vector<FairMQSocket*>::iterator itr = fPayloadOutputs->begin(); itr != fPayloadOutputs->end(); itr++ )
{
bytesOutputNew[i] = (*itr)->GetBytesTx();
megabytesPerSecondOutput[i] = ((double) (bytesOutputNew[i] - bytesOutput[i]) / (1024. * 1024.)) / (double) timeSinceLastLog_ms * 1000.;
bytesOutput[i] = bytesOutputNew[i];
@ -355,6 +349,7 @@ void FairMQDevice::LogSocketRates()
// End of temp stuff
t0 = t1;
boost::this_thread::sleep(boost::posix_time::milliseconds(fLogIntervalInMs));
} catch (boost::thread_interrupted&) {
cout << "rateLogger interrupted" << endl;
break;