reframe-hpc/reframe

`check_#ALL` format spec for perf handler does not work

Closed this issue · 2 comments

Specifying %(check_#ALL)s| alone as format for handlers_perflog fails to work.

'handlers_perflog': [
                {
                    'type': 'filelog',
                    'prefix': '%(check_system)s/%(check_partition)s',
                    'level': 'verbose',
                    'format': '%(check_#ALL)s',
                    'datefmt': '%FT%T%:z',
                    'append': True,
                },
            ]

In the config file reproduces the issue.

Some more comments:

  • If another record attribute is defined in the format, before or after %(check_#ALL)s, it works fine. For example: 'format': '%(check_result)s|%(check_#ALL)s',
  • The error is coming from this line:
    super().__init__(fmt, datefmt, style)

It is easily fixable if we disable the validation (checks if fmt and style are mismatched):

    def __init__(self, fmt=None, datefmt=None, perffmt=None,
                 ignore_keys=None, style='%'):
        super().__init__(fmt, datefmt, style, validate=False)

but maybe there is a better solution.