Commit b019c7f7 authored by Andreas Tsagkaropoulos's avatar Andreas Tsagkaropoulos
Browse files

Disabled the use of the `roc_calculation_mode` configuration option

parent 1d69413c
......@@ -129,18 +129,6 @@
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.6.28</version>
<scope>test</scope>
</dependency>
</dependencies>
......
......@@ -29,7 +29,7 @@ public class Constants {
public static String amq_library_configuration_location = "src/main/resources/config/eu.melodic.event.brokerclient.properties";
public static String topic_for_severity_announcement = "prediction.slo_severity_value";
public static int kept_values_per_metric = 5; //Default to be overriden from the configuration file. This indicates how many metric values are kept to calculate the "previous" metric value during the rate of change calculation
public static String roc_calculation_mode = "prototype"; //Can be simple or prototype - this is a default value to be overriden
public static String roc_calculation_mode = "prototype";
public static boolean self_publish_rule_file = false; //default value to be overriden
public static boolean single_slo_rule_active = true; //default value to be overriden
public static boolean first_run = true;
......
......@@ -77,7 +77,7 @@ public class Main {
}
prop.load(inputStream);
String slo_rules_topic = prop.getProperty("slo_rules_topic");
roc_calculation_mode = prop.getProperty("roc_calculation_mode");
//roc_calculation_mode = prop.getProperty("roc_calculation_mode");
kept_values_per_metric = Integer.parseInt(prop.getProperty("stored_values_per_metric","5"));
self_publish_rule_file = Boolean.parseBoolean(prop.getProperty("self_publish_rule_file"));
single_slo_rule_active = Boolean.parseBoolean(prop.getProperty("single_slo_rule_active"));
......
......@@ -133,6 +133,7 @@ public class PredictedMonitoringAttribute {
}
}
/*
else if (roc_calculation_mode.equals("simple")){
if (isZero(maximum_rate_of_change-minimum_rate_of_change)){
//TODO clarify if/else-if
......@@ -156,7 +157,9 @@ public class PredictedMonitoringAttribute {
}
normalized_rate_of_change = 100*rate_of_change;
}
}else{
}
*/
else{
Logger.getAnonymousLogger().log(severe_logging_level,"Effectively disabling rate of change (ROC) metric, setting it to 0, as an invalid roc_calculation_mode has been chosen");
rate_of_change = 0;
normalized_rate_of_change = 0;
......
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