Add benchmarks comparison job

This commit is contained in:
Siarhei Fedartsou 2024-05-11 21:13:10 +02:00
parent 83f9db4d8c
commit 2ec27d5f68

View File

@ -14,9 +14,9 @@ def create_markdown_table(results):
header = "| Benchmark | Base | PR |\n|-----------|------|----|"
rows = []
for result in results:
base = result['base']
pr = result['pr']
row = f"| {result['name']} | ```\n{base}\n``` | ```\n{pr}\n``` |"
base = result['base'].replace('\n', '<br/>')
pr = result['pr'].replace('\n', '<br/>')
row = f"| {result['name']} | <pre>{base}</pre> | <pre>{pr}</pre> |"
rows.append(row)
return f"{header}\n" + "\n".join(rows)