Commit d081feab authored by Carla Guillen's avatar Carla Guillen
Browse files

Bug fix

parent 51c287af
......@@ -67,9 +67,7 @@ void PerSystSqlOperator::compute(U_Ptr unit, qeJobData& jobData) {
// Getting the most recent values as specified in _window
// Since we do not clear the internal buffer, all sensor readings will be accumulated in the same vector
for(const auto& in : subUnit->getInputs()) {
elCtr = _buffer.size();
_queryEngine.querySensor(in->getName(), my_timestamp, my_timestamp, _buffer, false);
if (_buffer.size() <= elCtr) {
if(!_queryEngine.querySensor(in->getName(), my_timestamp, my_timestamp, _buffer, false)){
LOG(debug) << "Job Operator " << _name << " cannot read from sensor " << in->getName() << "!";
return;
}
......
......@@ -128,8 +128,7 @@ void SMUCNGPerfOperator::compute(U_Ptr unit) {
}
void SMUCNGPerfOperator::query(const std::string & sensor_name, const uint64_t timestamp, vector<reading_t> &buffer){
auto initSize = buffer.size();
if(_queryEngine.querySensor(sensor_name, timestamp, timestamp, buffer, false) || buffer.size() <= initSize) {
if(!_queryEngine.querySensor(sensor_name, timestamp, timestamp, buffer, false)) {
LOG(debug) << "SMUCNGPerf Operator " << _name << " cannot read from sensor " << sensor_name << "!";
}
}
......
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