Commit 1894f272 authored by Carla Guillen's avatar Carla Guillen
Browse files

Small bugfix in scaling factor

parent 57c48fd5
......@@ -99,6 +99,7 @@ void PerSystSqlOperator::copy(const PerSystSqlOperator& other){
void PerSystSqlOperator::printConfig(LOG_LEVEL ll) {
LOG_VAR(ll) << "backend=" << _backend;
LOG_VAR(ll) << "go_back_ms=" << _go_back_ns/1e6;
LOG_VAR(ll) << "_scaling_factor=" << _scaling_factor;
if(_backend == MARIADB){
LOG_VAR(ll) << "PerSystSQL Operator Connection information:";
LOG_VAR(ll) << "\tHost=" << _conn.host;
......@@ -134,6 +135,7 @@ void PerSystSqlOperator::compute(U_Ptr unit, qeJobData& jobData) {
SensorMetadata buffer;
if(_queryEngine.queryMetadata(in->getName(), buffer)){
_scaling_factor = buffer.scale;
LOG(debug) << "PerSystSql Operator " << _name << " using scaling factor of " << _scaling_factor;
}
}
if (!_queryEngine.querySensor(in->getName(), my_timestamp, my_timestamp, _buffer, false)) {
......
......@@ -126,7 +126,7 @@ private:
std::vector<double> _severities;
int _go_back_ns;
Backend_t _backend;
unsigned long long _scaling_factor;
double _scaling_factor;
struct MariaDB_conn_t {
std::string host;
......
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