Skip to content

Commit 59513c4

Browse files
committed
Fix logging of the %(check_perfvalues)s attribute
1 parent ca8414c commit 59513c4

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

reframe/core/pipeline.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,8 +1268,7 @@ def set_var_default(self, name, value):
12681268
@loggable
12691269
@property
12701270
def perfvalues(self):
1271-
return self._perfvalues
1272-
# return util.MappingView(self._perfvalues)
1271+
return util.MappingView(self._perfvalues)
12731272

12741273
@property
12751274
def job(self):

reframe/utility/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,6 +1473,9 @@ def __repr__(self):
14731473
def __str__(self):
14741474
return str(self.__container)
14751475

1476+
def __rfm_json_encode__(self):
1477+
return self.__container
1478+
14761479

14771480
class MappingView(collections.abc.Mapping):
14781481
'''A read-only view of a mapping.
@@ -1535,3 +1538,6 @@ def __repr__(self):
15351538

15361539
def __str__(self):
15371540
return str(self.__mapping)
1541+
1542+
def __rfm_json_encode__(self):
1543+
return self.__mapping

tutorials/cscs-webinar-2022/config/mysettings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
'ref=%(check_perf_ref)s '
155155
'(l=%(check_perf_lower_thres)s, '
156156
'u=%(check_perf_upper_thres)s)|'
157-
'%(check_perf_unit)s|%(check_perfvalues)s'
157+
'%(check_perf_unit)s'
158158
),
159159
'append': True
160160
}

0 commit comments

Comments
 (0)