Commit 08cb0131 authored by Carla Guillen's avatar Carla Guillen

implementing metrics which go through smucngperf plugin, without...

implementing metrics which go through smucngperf plugin, without transformations (basically only renaming), so that timestamps correspond with each other.
parent 7ad7b998
......@@ -101,7 +101,8 @@ void PerSystSqlOperator::printConfig(LOG_LEVEL ll) {
LOG_VAR(ll) << "====================================";
LOG_VAR(ll) << "backend=" << _backend;
LOG_VAR(ll) << "go_back_ms=" << _go_back_ns/1e6;
LOG_VAR(ll) << "_scaling_factor=" << _scaling_factor;
LOG_VAR(ll) << "scaling_factor=" << _scaling_factor;
LOG_VAR(ll) << "batch_domain=" << _batch_domain;
if(_backend == MARIADB){
LOG_VAR(ll) << "PerSystSQL Operator Connection information:";
LOG_VAR(ll) << "\tHost=" << _conn.host;
......@@ -115,7 +116,6 @@ void PerSystSqlOperator::printConfig(LOG_LEVEL ll) {
}
LOG_VAR(ll) << "Property Configuration:";
LOG_VAR(ll) << "\tnumber_of_even_quantiles=" << _number_of_even_quantiles;
LOG_VAR(ll) << "\tbatch_domain=" << _batch_domain;
LOG_VAR(ll) << "\tproperty_id=" << _property_id;
LOG_VAR(ll) << "Severity Configuration:";
LOG_VAR(ll) << "\tseverity_formula=" << _severity_formula;
......@@ -146,9 +146,6 @@ void PerSystSqlOperator::compute(U_Ptr unit, qeJobData& jobData) {
_buffer.clear();
size_t elCtr = 0;
uint64_t my_timestamp = getTimestamp() - _go_back_ns;
// Making sure that the aggregation boundaries do not go past the job start/end time
uint64_t jobEnd = jobData.endTime != 0 && my_timestamp > jobData.endTime ? jobData.endTime : my_timestamp;
uint64_t jobStart = jobEnd - my_timestamp < jobData.startTime ? jobData.startTime : jobEnd - my_timestamp;
// Job units are hierarchical, and thus we iterate over all sub-units associated to each single node
std::vector<std::string> vectorOfSensorNames;
for (const auto& subUnit : unit->getSubUnits()) {
......
......@@ -35,8 +35,11 @@ SMUCNGPerfConfigurator::SMUCNGPerfConfigurator() : OperatorConfiguratorTemplate(
_metricMap["CLOCKS"]=SMUCSensorBase::CLOCKS;
_metricMap["CLOCKS_REF"]=SMUCSensorBase::CLOCKS_REF;
_metricMap["USERPCT"]=SMUCSensorBase::USERPCT;
_metricMap["USERPCT0"]=SMUCSensorBase::USERPCT0;
_metricMap["SYSTEMPCT"]=SMUCSensorBase::SYSTEMPCT;
_metricMap["SYSTEMPCT0"]=SMUCSensorBase::SYSTEMPCT0;
_metricMap["IOWAITPCT"]=SMUCSensorBase::IOWAITPCT;
_metricMap["IOWAITPCT0"]=SMUCSensorBase::IOWAITPCT0;
_metricMap["MEMUSED"]=SMUCSensorBase::MEMUSED;
_metricMap["IOBYTESREAD"]=SMUCSensorBase::IOBYTESREAD;
_metricMap["IOBYTESWRITE"]=SMUCSensorBase::IOBYTESWRITE;
......
......@@ -95,6 +95,10 @@ SMUCNGPerfOperator::SMUCNGPerfOperator(const std::string& name): OperatorTemplat
_flop_metric = {SMUCSensorBase::FLOPS, SMUCSensorBase::PACKED_FLOPS, SMUCSensorBase::AVX512_TOVECTORIZED_RATIO, SMUCSensorBase::VECTORIZATION_RATIO,
SMUCSensorBase::SINGLE_PRECISION_TO_TOTAL_RATIO, SMUCSensorBase::PACKED128_FLOPS, SMUCSensorBase::PACKED256_FLOPS, SMUCSensorBase::PACKED512_FLOPS,
SMUCSensorBase::SINGLE_PRECISION_FLOPS,SMUCSensorBase::DOUBLE_PRECISION_FLOPS};
_as_is_metric[SMUCSensorBase::USERPCT] = SMUCSensorBase::USERPCT0;
_as_is_metric[SMUCSensorBase::SYSTEMPCT] = SMUCSensorBase::SYSTEMPCT0;
_as_is_metric[SMUCSensorBase::IOWAITPCT] = SMUCSensorBase::IOWAITPCT0;
}
SMUCNGPerfOperator::~SMUCNGPerfOperator() {
......@@ -119,6 +123,7 @@ void SMUCNGPerfOperator::copy(const SMUCNGPerfOperator& other){
this->_metricRatioToPair = other._metricRatioToPair;
this->_profileMetricToMetricIds = other._profileMetricToMetricIds;
this->_flop_metric = other._flop_metric;
this->_as_is_metric = other._as_is_metric;
}
void SMUCNGPerfOperator::printConfig(LOG_LEVEL ll) {
......@@ -160,7 +165,15 @@ void SMUCNGPerfOperator::compute(U_Ptr unit) {
outSensor->getMetric() == SMUCSensorBase::INTRA_NODE_LOADIMBALANCE) {
computeLOADIMBALANCES(inputs, outSensor, timestamp);
} else {
LOG(error) << "Derived metric " << outSensor->getMetric() << " not implemented.";
auto found = _as_is_metric.find(outSensor->getMetric());
if(found == _as_is_metric.end()){
LOG(error) << "Metric as is " << outSensor->getMetric() << " not implemented.";
}
SMUCSensorBase::Metric_t metric = found->second;
query(inputs[_metricToPosition[metric]]->getName(), timestamp, _buffers[0]);
if(_buffers[0].size() > 0 ) {
outSensor->storeReading(_buffers[0][0]);
}
}
resetBuffers();
}
......@@ -176,6 +189,7 @@ void SMUCNGPerfOperator::resetBuffers(){
for(auto &buffer: _buffers){
buffer.clear();
}
}
void SMUCNGPerfOperator::computeMetricPerSecond(std::vector<SMUCNGPtr> &inputs, SMUCNGPtr& outSensor, const uint64_t timestamp) {
......
......@@ -59,6 +59,7 @@ protected:
std::map<SMUCSensorBase::Metric_t, std::pair<SMUCSensorBase::Metric_t, SMUCSensorBase::Metric_t>> _metricRatioToPair;
std::map<SMUCSensorBase::Metric_t, std::vector<SMUCSensorBase::Metric_t>> _profileMetricToMetricIds;
std::set<SMUCSensorBase::Metric_t> _flop_metric;
std::map<SMUCSensorBase::Metric_t, SMUCSensorBase::Metric_t> _as_is_metric;
vector<vector<reading_t>> _buffers;
const unsigned int MAX_FREQ_MHZ = 2700;
const unsigned int MIN_FREQ_MHZ = 1200;
......
......@@ -140,6 +140,9 @@ public:
DOUBLE_PRECISION_FLOPS=102,
PKG_POWER=200,
DRAM_POWER=201,
USERPCT0=300,
SYSTEMPCT0=301,
IOWAITPCT0=302,
NONE
};
public:
......
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