Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions config/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,31 @@
# ReFrame CSCS settings
#

import json
import os


def _format_httpjson(record, extras, ignore_keys):
"""
https://github.com/eth-cscs/cscs-reframe-tests/pull/380
"""
data = {}
for attr, val in record.__dict__.items():
if attr in ignore_keys or attr.startswith('_'):
continue

if attr == "check_perf_value" and val is not None:
data[attr] = float(val)
elif attr == "check_perf_ref" and val is not None:
data[attr] = float(val)
else:
data[attr] = val

data.update(extras)

return json.dumps(data)


site_configuration = {
'environments': [
{
Expand Down Expand Up @@ -75,6 +97,8 @@
'rfm_ci_pipeline': os.getenv("CI_PIPELINE_URL", "#"),
'rfm_ci_project': os.getenv("CI_PROJECT_PATH", "Unknown CI Project")
},
# 'debug': True,
"json_formatter": _format_httpjson,
'ignore_keys': ['check_perfvalues']
}
]
Expand Down