Commit a171c9e1 authored by Ignacio's avatar Ignacio
Browse files

adding queue size)

parent d2132ed9
......@@ -153,6 +153,14 @@ class KubeJobStreamProgress(Plugin):
}
return input_manifest
def get_queue_size_manifest(self, queue , timestamp):
queue_manifest = {'name': 'queue_size',
'value': queue,
'timestamp': timestamp,
'dimensions': self.dimensions
}
return queue_manifest
def get_application_progress_error_manifest(self, error, timestamp):
application_progress_error = {'name': 'application_progress_error',
'value': error,
......@@ -239,13 +247,16 @@ class KubeJobStreamProgress(Plugin):
timestamp)
parallelism = \
self.get_parallelism_manifest(replicas, timestamp)
queue = self.get_queue_size_manifest(main_q_size,timestamp)
self.publish_persistent_measurement(application_progress_error,
time_progress_error,
parallelism,
input_flux,
real_output_flux,
expected_output_flux)
expected_output_flux,
queue)
self.report_job(timestamp)
except Exception:
self.LOG.log(traceback.format_exc())
......@@ -256,7 +267,8 @@ class KubeJobStreamProgress(Plugin):
parallelism,
input_flux,
real_output_flux,
expected_output_flux):
expected_output_flux,
queue):
self.datasource.send_metrics([application_progress_error])
self.datasource.send_metrics([time_progress_error])
......@@ -264,6 +276,7 @@ class KubeJobStreamProgress(Plugin):
self.datasource.send_metrics([input_flux])
self.datasource.send_metrics([real_output_flux])
self.datasource.send_metrics([expected_output_flux])
self.datasource.send_metrics([queue])
def report_job(self,timestamp):
if self.report_flag:
......
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