Skip to content

Commit 36afc5c

Browse files
authored
Merge pull request #3516 from ekouts/feat/sanity_logging
[feat] Log also results from sanity-only tests through the perflog handlers
2 parents 6faf9c7 + 95f26be commit 36afc5c

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

docs/tutorial.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2072,6 +2072,10 @@ Let's walk briefly through the most important parts of its configuration:
20722072

20732073
Let's rerun our STREAM example using the new configuration:
20742074

2075+
.. note::
2076+
2077+
ReFrame will now add entries in the perflogs for all tests, not only for performance tests.
2078+
20752079
.. code-block:: bash
20762080
:caption: Run with the Docker compose setup.
20772081

reframe/core/logging.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -933,8 +933,8 @@ def _update_check_extras(self):
933933
self.extra['check_job_completion_time_unix'], r'%FT%T%:z'
934934
)
935935

936-
def log_performance(self, level, task, msg=None, multiline=False):
937-
if self.check is None or not self.check.is_performance_check():
936+
def log_result(self, level, task, msg=None, multiline=False):
937+
if self.check is None:
938938
return
939939

940940
_, part, env = task.testcase
@@ -951,7 +951,7 @@ def log_performance(self, level, task, msg=None, multiline=False):
951951
if msg is None:
952952
msg = 'sent by ' + self.extra['osuser']
953953

954-
if multiline:
954+
if self.check.is_performance_check() and multiline:
955955
# Log one record for each performance variable
956956
for var, info in self.check.perfvalues.items():
957957
val, ref, lower, upper, unit, result = info

reframe/frontend/executors/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,8 @@ def finalize(self):
525525
self._current_stage = 'finalize'
526526
self._notify_listeners('on_task_success')
527527
try:
528-
self._perflogger.log_performance(logging.INFO, self,
529-
multiline=self._perflog_compat)
528+
self._perflogger.log_result(logging.INFO, self,
529+
multiline=self._perflog_compat)
530530
except LoggingError as e:
531531
getlogger().warning(
532532
f'could not log performance data for {self.testcase}: {e}'
@@ -550,8 +550,8 @@ def _wait_job(job):
550550
self._exc_info = exc_info or sys.exc_info()
551551
self._notify_listeners(callback)
552552
try:
553-
self._perflogger.log_performance(logging.INFO, self,
554-
multiline=self._perflog_compat)
553+
self._perflogger.log_result(logging.INFO, self,
554+
multiline=self._perflog_compat)
555555
except LoggingError as e:
556556
getlogger().warning(
557557
f'could not log performance data for {self.testcase}: {e}'

0 commit comments

Comments
 (0)