From 37570915ec5ad9459068e52481efd196c9fc4c0c Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Mon, 18 Dec 2023 21:14:40 +0100 Subject: [PATCH] Expose job submit time as a loggable property --- docs/config_reference.rst | 1 + reframe/core/pipeline.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/docs/config_reference.rst b/docs/config_reference.rst index 3b97160393..8c121976d5 100644 --- a/docs/config_reference.rst +++ b/docs/config_reference.rst @@ -1066,6 +1066,7 @@ All logging handlers share the following set of common attributes: ``%(check_job_completion_time_unix)s``, The completion time of the associated run job (see :attr:`~reframe.core.schedulers.Job.completion_time`). ``%(check_job_exitcode)s``, The exit code of the associated run job. ``%(check_job_nodelist)s``, The list of nodes that the associated run job has run on. + ``%(check_job_submit_time)s``, The submission time of the associated run job (see :attr:`~reframe.core.schedulers.Job.submit_time`). ``%(check_jobid)s``, The ID of the associated run job. ``%(check_keep_files)s``, The value of the :attr:`~reframe.core.pipeline.RegressionTest.keep_files` attribute. ``%(check_local)s``, The value of the :attr:`~reframe.core.pipeline.RegressionTest.local` attribute. diff --git a/reframe/core/pipeline.py b/reframe/core/pipeline.py index a6f51ac674..95a241be2c 100644 --- a/reframe/core/pipeline.py +++ b/reframe/core/pipeline.py @@ -1497,6 +1497,12 @@ def _jobid(self): if self.job: return self.job.jobid + @loggable_as('job_submit_time') + @property + def _job_submit_time(self): + if self.job: + return self.job.submit_time + @loggable_as('job_completion_time_unix') @property def _job_completion_time(self):