Skip to content

Commit

Permalink
Merge pull request #2034 from igchor/benchmark_tweaks
Browse files Browse the repository at this point in the history
[Benchmarks] minor tweaks
  • Loading branch information
igchor authored Aug 29, 2024
2 parents b09a969 + 413d458 commit 70e4cdc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/benchmarks/benches/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def run(self, env_vars) -> Result:

result = self.run_bench(command, env_vars)
(label, mean) = self.parse_output(result)
return Result(label=label, value=mean, command=command, env=env_vars, stdout=result)
return Result(label=label, value=mean, command=command, env=env_vars, stdout=result, lower_is_better=self.lower_is_better())

def parse_output(self, output):
csv_file = io.StringIO(output)
Expand Down
2 changes: 1 addition & 1 deletion scripts/benchmarks/benches/velocity.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def run(self, env_vars) -> Result:

result = self.run_bench(command, env_vars)

return Result(label=self.bench_name, value=self.parse_output(result), command=command, env=env_vars, stdout=result)
return Result(label=self.bench_name, value=self.parse_output(result), command=command, env=env_vars, stdout=result, lower_is_better=self.lower_is_better())

def teardown(self):
return
3 changes: 2 additions & 1 deletion scripts/benchmarks/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def generate_summary_table(chart_data: dict[str, list[Result]]):
if key in results:
value = results[key].value
if key == best_key:
row += f" `**{value}**` |" # Highlight the best value
row += f" <ins>{value}</ins> |" # Highlight the best value
else:
row += f" {value} |"
else:
Expand All @@ -132,6 +132,7 @@ def generate_markdown(chart_data: dict[str, list[Result]]):

return f"""
# Summary
<ins>result</ins> is better\n
{summary_table}
# Charts
{mermaid_script}
Expand Down

0 comments on commit 70e4cdc

Please sign in to comment.