Commit 70ccf194 authored by Michael Ott's avatar Michael Ott
Browse files

Merge branch 'master' of gitlab.lrz.de:dcdb/dcdb

parents e4db3ce6 14d87e6d
......@@ -90,8 +90,8 @@ DCDB_OP_RESULT scale(int64_t* result, double scalingFactor, double baseScalingFa
/* Safe delta function */
DCDB_OP_RESULT delta(int64_t lh, int64_t rh, int64_t* result) {
//TODO: Need to address overflow for monothonic sensor data, e.g., energy reaching max value.
//Maybe need to add another field to sensorconfig ("monothonic")?
//TODO: Need to address overflow for monotonic sensor data, e.g., energy reaching max value.
//Maybe need to add another field to sensorconfig ("monotonic")?
//Or need to pass the maximum value detectable by the sensor?
*result = lh - rh;
......
......@@ -285,6 +285,7 @@ void DCDBQuery::doQuery(const char* hostname, std::list<std::string> sensors, DC
scalingFactor = 1;
unit = "none";
notifyOverflow = false;
/* Output format initialization */
valueFormat = {false,1,"none"};
......@@ -389,7 +390,7 @@ void DCDBQuery::doQuery(const char* hostname, std::list<std::string> sensors, DC
sensor.query(results, start, end, DCDB::AGGREGATE_NONE);
genOutput(results);
if(notifyOverflow)
std::cout << "There has been overflow on some functions. " << std::endl;
std::cout << "Overflow detected." << std::endl;
}
/*
......
Supports Markdown
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