Commit fcda18d4 authored by Diego Gama's avatar Diego Gama 💻
Browse files

Pushing code to an appropriate location

parent 160f20d8
......@@ -56,7 +56,6 @@ class KubeJobStreamProgress(Plugin):
self.report_flag = True
self.last_replicas = last_replicas
self.last_error = 0.0
self.last_real_output_flux = None
self.last_timestamp = time.time() * 1000
self.last_completed_items = 0
self. last_inserted_items = 0
......@@ -94,18 +93,14 @@ class KubeJobStreamProgress(Plugin):
raise ex.BadRequestException("Unknown datasource type...!")
def get_error(self, inserted_items, completed_items, main_q_size, replicas):
input_flux = (inserted_items - self.last_inserted_items)/self.collect_period
if self.last_real_output_flux == None:
self.last_real_output_flux = 0.0
input_flux = (inserted_items - self.last_inserted_items)/self.collect_period
real_output_flux = (completed_items - self.last_completed_items)/self.collect_period
expected_output_flux = replicas/self.expected_time
error0 = self.last_real_output_flux - input_flux
error0 = real_output_flux - input_flux
error1 = expected_output_flux - input_flux
self.last_real_output_flux = (completed_items - self.last_completed_items)/self.collect_period
current_error = error1 if self.error_option else error0
corrector_term_check = True if main_q_size > input_flux*5 else False #This term exist to make the queue decrease
......
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