PapiHistory.reset_papi_history(node)
@staticmethod
def add_to_papi_history(node, csit_papi_command, papi=True, **kwargs):
"""Add command to PAPI command history on DUT node.
PapiHistory.reset_papi_history(node)
@staticmethod
def add_to_papi_history(node, csit_papi_command, papi=True, **kwargs):
"""Add command to PAPI command history on DUT node.
- for key, val in kwargs.iteritems():
- args.append("{key}={val}".format(key=key, val=val))
- item = "{cmd}({args})".format(cmd=csit_papi_command,
- args=",".join(args))
+ for key, val in kwargs.items():
+ args.append(f"{key}={val!r}")
+ item = f"{csit_papi_command}({u','.join(args)})"
else:
# This else part is here to store VAT commands.
# VAT history is not used.
# TODO: Remove when VatExecutor is completely removed.
else:
# This else part is here to store VAT commands.
# VAT history is not used.
# TODO: Remove when VatExecutor is completely removed.
- history_list = ("No PAPI command executed", )
- logger.info(
- "{0} PAPI command history:\n{1}\n".format(
- node['host'], "\n".join(history_list)))
+ history_list = (u"No PAPI command executed", )
+ history = u'\n'.join(history_list)
+ logger.info(f"{node[u'host']} PAPI command history:\n{history}\n")