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 da3cf5c4 authored by Alessio Netti's avatar Alessio Netti
Browse files

Adding missed queries counter to statistics

parent 16d19753
......@@ -93,6 +93,7 @@ uint64_t msgCtr;
uint64_t readingCtr;
uint64_t dbQueryCtr;
uint64_t cachedQueryCtr;
uint64_t missesQueryCtr;
SensorCache mySensorCache;
AnalyticsController* analyticsController;
DCDB::Connection* dcdbConn;
......@@ -204,6 +205,8 @@ bool sensorGroupQueryCallback(const std::vector<string>& names, const uint64_t s
reading.timestamp = r.timeStamp.getRaw();
buffer.push_back(reading);
}
} else {
missesQueryCtr += topics.size();
}
}
catch (const std::exception &e) {}
......@@ -909,6 +912,7 @@ int main(int argc, char* const argv[]) {
readingCtr = 0;
dbQueryCtr = 0;
cachedQueryCtr = 0;
missesQueryCtr = 0;
start = getTimestamp();
uint64_t lastCleanup = start;
......@@ -936,11 +940,12 @@ int main(int argc, char* const argv[]) {
elapsed = (float)(NS_TO_S(end) - NS_TO_S(start));
float aIns = ceil(((float)analyticsController->getReadingCtr()) / elapsed);
float cacheReq = ceil(((float)cachedQueryCtr) / elapsed);
float missesReq = ceil(((float)missesQueryCtr) / elapsed);
float dbReq = ceil(((float)dbQueryCtr) / elapsed);
float rIns = restAPISettings.enabled ? ceil(((float)httpsServer->getInfluxCounter()) / elapsed) : 0.0f;
float mIns = ceil(((float)readingCtr) / elapsed);
float mMsg = ceil(((float) msgCtr) / elapsed);
LOG(info) << "Performance: MQTT [" << std::fixed << std::setprecision(0) << mIns << " ins/s|" << mMsg << " msg/s] REST [" << rIns << " ins/s] Analytics [" << aIns << " ins/s] Cache [" << cacheReq << " req/s] DB [" << dbReq << " req/s]";
LOG(info) << "Performance: MQTT [" << std::fixed << std::setprecision(0) << mIns << " ins/s|" << mMsg << " msg/s] REST [" << rIns << " ins/s] Analytics [" << aIns << " ins/s] Cache [" << cacheReq << " req/s] DB [" << dbReq << " req/s] Miss [" << missesReq << " req/s]";
std::map<std::string, hostInfo_t> lastSeen = ms.collectLastSeen();
uint64_t connectedHosts = 0;
for (auto h: lastSeen) {
......@@ -955,6 +960,7 @@ int main(int argc, char* const argv[]) {
std::list<SensorDataStoreReading> stats;
stats.push_back(SensorDataStoreReading(SensorId(statisticsMqttTopic+"/msgsRcvd"), end, msgCtr));
stats.push_back(SensorDataStoreReading(SensorId(statisticsMqttTopic+"/cachedQueries"), end, cachedQueryCtr));
stats.push_back(SensorDataStoreReading(SensorId(statisticsMqttTopic+"/missedQueries"), end, missesQueryCtr));
stats.push_back(SensorDataStoreReading(SensorId(statisticsMqttTopic+"/dbQueries"), end, dbQueryCtr));
stats.push_back(SensorDataStoreReading(SensorId(statisticsMqttTopic+"/readingsRcvd"), end, readingCtr));
stats.push_back(SensorDataStoreReading(SensorId(statisticsMqttTopic+"/hosts"), end, connectedHosts));
......@@ -966,6 +972,7 @@ int main(int argc, char* const argv[]) {
msgCtr = 0;
cachedQueryCtr = 0;
missesQueryCtr = 0;
dbQueryCtr = 0;
readingCtr = 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