]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
report run time and wait time of job
authorShraddha Agrawal <shraddha.agrawal000@gmail.com>
Sat, 22 Aug 2020 13:43:24 +0000 (19:13 +0530)
committerShraddha Agrawal <shraddha.agrawal000@gmail.com>
Sat, 22 Aug 2020 13:43:24 +0000 (19:13 +0530)
This commit adds the start, wait and run time of a job in h:m:s
format. This is enabled by reporting the job status as running
before wait status.

Signed-off-by: Shraddha Agrawal <shraddha.agrawal000@gmail.com>
teuthology/dispatcher/__init__.py

index 55efbf1d8b2495dff53c9ecb36ecdb0e6804dc7d..3e03a2b8ae5ed4d8834e9d0fea018b85cac2190f 100644 (file)
@@ -8,6 +8,7 @@ from datetime import datetime
 
 from teuthology import setup_log_file, install_except_hook
 from teuthology import beanstalk
+from teuthology import report
 from teuthology.config import config as teuth_config
 from teuthology.repo_utils import fetch_qa_suite, fetch_teuthology
 from teuthology.lock.ops import block_and_lock_machines
@@ -158,6 +159,7 @@ def main(args):
 
 
 def lock_machines(job_config):
+    report.try_push_job_info(job_config, dict(status='running'))
     fake_ctx = supervisor.create_fake_context(job_config, block=True)
     block_and_lock_machines(fake_ctx, len(job_config['roles']),
                             job_config['machine_type'], reimage=False)