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

Analytics: improving normalization in CS plugin

parent 97e618bd
......@@ -429,13 +429,13 @@ void CSOperator::computeSignature(U_Ptr unit, uint64_t nowTs) {
// Normalizes sensor data
void CSOperator::normalize(std::vector<reading_t> &v, size_t idx) {
int64_t denom = _max[idx]!=_min[idx] ? (_max[idx] - _min[idx]) : 1;
double denom = _max[idx]!=_min[idx] ? (double)_scalingFactor / (double)(_max[idx] - _min[idx]) : (double)_scalingFactor;
for(size_t idx2=0; idx2<v.size(); idx2++) {
if(v[idx2].value > _max[idx])
v[idx2].value = _max[idx];
else if(v[idx2].value < _min[idx])
v[idx2].value = _min[idx];
v[idx2].value = (v[idx2].value - _min[idx]) * _scalingFactor / denom;
v[idx2].value = (int64_t)((double)(v[idx2].value - _min[idx]) * denom);
}
}
......
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