Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 8980ca88 authored by Michael Ott's avatar Michael Ott
Browse files

Add insert rate to CollectAgent statistics

parent 26c1eb85
......@@ -56,6 +56,7 @@ int keepRunning;
bool statistics;
uint64_t msgCtr;
uint64_t pmsgCtr;
uint64_t readingCtr;
DCDB::Connection* dcdbConn;
DCDB::SensorDataStore *mySensorDataStore;
DCDB::SensorConfig *mySensorConfig;
......@@ -208,6 +209,7 @@ int mqttCallback(SimpleMQTTMessage *msg)
mySensorCache.storeSensor(sid, payload[i].timestamp, payload[i].value);
}
mySensorDataStore->insertBatch(readings);
readingCtr+= readings.size();
//mySensorCache.dump();
}
......@@ -457,9 +459,11 @@ int main(int argc, char* const argv[]) {
keepRunning = 1;
timeval start, end;
double elapsed;
LOG(info) << "Collect Agent running...";
msgCtr = 0;
pmsgCtr = 0;
readingCtr = 0;
LOG(info) << "Collect Agent running...";
while(keepRunning) {
gettimeofday(&start, NULL);
sleep(60);
......@@ -469,10 +473,11 @@ int main(int argc, char* const argv[]) {
elapsed += (end.tv_usec - start.tv_usec) / 1000.0;
float publish = msgCtr?(pmsgCtr*100.0)/msgCtr:0;
if (settings.statistics) {
LOG(info) << "Message rate: " << (msgCtr/elapsed)*1000.0 << " messages/second (" << publish << "% PUBLISH)";
LOG(info) << "Performance: " << (readingCtr/elapsed)*1000.0 << " inserts/s, " << (msgCtr/elapsed)*1000.0 << " messages/s (" << publish << "% PUBLISH)";
}
msgCtr = 0;
pmsgCtr = 0;
readingCtr = 0;
}
LOG(info) << "Stopping...";
......
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