In January 2021 we will introduce a 10 GB quota for project repositories. Higher limits for individual projects will be available on request. Please see https://doku.lrz.de/display/PUBLIC/GitLab for more information.

Commit 2fc4a776 authored by Micha Müller's avatar Micha Müller

CollectAgent: Add option for special benchmark mode which discards all messages

parent 78cce230
......@@ -73,6 +73,13 @@
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
/**
* Uncomment and recompile to activate CollectAgent's special benchmark mode.
* In this mode, all received messages will be discarded and no data is stored
* in the storage backend.
*/
//#define BENCHMARK_MODE
using namespace std;
int keepRunning;
......@@ -236,6 +243,8 @@ int mqttCallback(SimpleMQTTMessage *msg)
if (msg->isPublish())
pmsgCtr++;
#ifndef BENCHMARK_MODE
uint64_t len;
/*
* Decode the message and put into the database.
......@@ -406,15 +415,12 @@ int mqttCallback(SimpleMQTTMessage *msg)
readingCtr+= readings.size();
//mySensorCache.dump();
} else {
LOG(error) << "Message with empty topic received";
}
#if 1
else {
cout << "Wrong topic format: " << msg->getTopic() << "\n";
return 1;
}
#endif
}
}
#endif
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment