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

PrintConfig functionality added to Data Analytics Framework

- Added some more indentation to make the configurations more readable
- Fixed one more warning in dcdbquery
parent abf6af19
...@@ -65,7 +65,8 @@ public: ...@@ -65,7 +65,8 @@ public:
void setCounterData(int counterData) { _counterData = static_cast<PORT_COUNTER_DATA>(counterData); } void setCounterData(int counterData) { _counterData = static_cast<PORT_COUNTER_DATA>(counterData); }
void printConfig(LOG_LEVEL ll, LOGGER& lg) { void printConfig(LOG_LEVEL ll, LOGGER& lg, unsigned leadingSpaces=16) {
std::string leading(leadingSpaces, ' ');
std::string cntData("unknown"); std::string cntData("unknown");
switch (_counterData) { switch (_counterData) {
case portXmitData: case portXmitData:
...@@ -150,7 +151,7 @@ public: ...@@ -150,7 +151,7 @@ public:
cntData = "uncorrectableErrors"; cntData = "uncorrectableErrors";
break; break;
} }
LOG_VAR(ll) << " Counter data: " << cntData; LOG_VAR(ll) << leading << " Counter data: " << cntData;
} }
protected: protected:
......
...@@ -106,8 +106,9 @@ public: ...@@ -106,8 +106,9 @@ public:
} }
} }
void printConfig(LOG_LEVEL ll, LOGGER& lg) { void printConfig(LOG_LEVEL ll, LOGGER& lg, unsigned leadingSpaces=16) {
LOG_VAR(ll) << " XML Path: " << getXMLPathString(); std::string leading(leadingSpaces, ' ');
LOG_VAR(ll) << leading << " XML Path: " << getXMLPathString();
} }
protected: protected:
......
...@@ -44,9 +44,10 @@ public: ...@@ -44,9 +44,10 @@ public:
void setType(unsigned type) { _type = type; } void setType(unsigned type) { _type = type; }
void setConfig(unsigned config) { _config = config; } void setConfig(unsigned config) { _config = config; }
void printConfig(LOG_LEVEL ll, LOGGER& lg) { void printConfig(LOG_LEVEL ll, LOGGER& lg, unsigned leadingSpaces=16) {
LOG_VAR(ll) << " Type: " << _type; std::string leading(leadingSpaces, ' ');
LOG_VAR(ll) << " Config: " << _config; LOG_VAR(ll) << leading << " Type: " << _type;
LOG_VAR(ll) << leading << " Config: " << _config;
} }
protected: protected:
......
...@@ -47,14 +47,11 @@ public: ...@@ -47,14 +47,11 @@ public:
void setCPUId(int i) { this->_cpuId = i; } void setCPUId(int i) { this->_cpuId = i; }
int getCPUId() { return this->_cpuId; } int getCPUId() { return this->_cpuId; }
void printConfig(LOG_LEVEL ll, LOGGER& lg) { void printConfig(LOG_LEVEL ll, LOGGER& lg, unsigned leadingSpaces=16) {
LOG_VAR(ll) << " Metric: " << _metric; std::string leading(leadingSpaces, ' ');
LOG_VAR(ll) << " CPU Id: " << _cpuId; LOG_VAR(ll) << leading << " Metric: " << _metric;
if (_perCPU) { LOG_VAR(ll) << leading << " CPU Id: " << _cpuId;
LOG_VAR(ll) << " perCPU: true"; LOG_VAR(ll) << leading << " PerCPU: " << (_perCPU ? "enabled" : "disabled");
} else {
LOG_VAR(ll) << " perCPU: false";
}
} }
protected: protected:
......
...@@ -67,8 +67,9 @@ public: ...@@ -67,8 +67,9 @@ public:
} }
const std::string getOIDSuffix() const { return _oidSuffix; } const std::string getOIDSuffix() const { return _oidSuffix; }
void printConfig(LOG_LEVEL ll, LOGGER& lg) { void printConfig(LOG_LEVEL ll, LOGGER& lg, unsigned leadingSpaces=16) {
LOG_VAR(ll) << " OID: " << getOIDString(); std::string leading(leadingSpaces, ' ');
LOG_VAR(ll) << leading << " OID: " << getOIDString();
} }
......
...@@ -64,12 +64,13 @@ public: ...@@ -64,12 +64,13 @@ public:
void setRegex(boost::regex regx) { _regx = regx; } void setRegex(boost::regex regx) { _regx = regx; }
void setSubstitution(const std::string& substitution) { _substitution = substitution; } void setSubstitution(const std::string& substitution) { _substitution = substitution; }
void printConfig(LOG_LEVEL ll, LOGGER& lg) { void printConfig(LOG_LEVEL ll, LOGGER& lg, unsigned leadingSpaces=16) {
std::string leading(leadingSpaces, ' ');
if (_filter) { if (_filter) {
LOG_VAR(ll) << " Using regular expression as filter"; LOG_VAR(ll) << leading << " Using regular expression as filter";
LOG_VAR(ll) << " Substitution: " << _substitution; LOG_VAR(ll) << leading << " Substitution: " << _substitution;
} else { } else {
LOG_VAR(ll) << " Not using any filter"; LOG_VAR(ll) << leading << " Not using any filter";
} }
} }
......
...@@ -16,7 +16,7 @@ public: ...@@ -16,7 +16,7 @@ public:
TesterSensorBase(const std::string& name) : SensorBase(name) {} TesterSensorBase(const std::string& name) : SensorBase(name) {}
virtual ~TesterSensorBase() {} virtual ~TesterSensorBase() {}
void printConfig(LOG_LEVEL ll, LOGGER& lg) { /* nothing to print */ } void printConfig(LOG_LEVEL ll, LOGGER& lg, unsigned leadingSpaces=16) { /* nothing to print */ }
}; };
#endif /* TESTER_TESTERSENSORBASE_H_ */ #endif /* TESTER_TESTERSENSORBASE_H_ */
...@@ -106,7 +106,7 @@ void DCDBQuery::genOutput(std::list<DCDB::SensorDataStoreReading> &results, quer ...@@ -106,7 +106,7 @@ void DCDBQuery::genOutput(std::list<DCDB::SensorDataStoreReading> &results, quer
} }
std::cout << std::endl; std::cout << std::endl;
int64_t prevValue; int64_t prevValue=0;
DCDB::TimeStamp prevT((uint64_t) 0); DCDB::TimeStamp prevT((uint64_t) 0);
for (std::list<DCDB::SensorDataStoreReading>::iterator reading = results.begin(); reading != results.end(); reading++) { for (std::list<DCDB::SensorDataStoreReading>::iterator reading = results.begin(); reading != results.end(); reading++) {
int64_t value = (*reading).value; int64_t value = (*reading).value;
......
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