Skip to content

Commit c125082

Browse files
fixup
1 parent ffce9f5 commit c125082

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

devops/actions/run-tests/benchmark/action.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,9 @@ runs:
231231
WORKDIR="$(realpath ./llvm_test_workdir)"
232232
if [ -n "$WORKDIR" ] && [ -d "$WORKDIR" ] && [[ "$WORKDIR" == *llvm_test_workdir* ]]; then rm -rf "$WORKDIR" ; fi
233233

234-
# Clean up potentially existing, old summary file
235-
[ -f "github_summary.md" ] && rm github_summary.md
234+
# Clean up potentially existing, old summary files
235+
[ -f "github_summary_exe.md" ] && rm github_summary_exe.md
236+
[ -f "github_summary_reg.md" ] && rm github_summary_reg.md
236237

237238
numactl --cpunodebind "$NUMA_NODE" --membind "$NUMA_NODE" \
238239
./devops/scripts/benchmarks/main.py "$WORKDIR" \
@@ -277,8 +278,9 @@ runs:
277278
if: always()
278279
shell: bash
279280
run: |
280-
# Cache changes and upload github summary
281-
[ -f "github_summary.md" ] && cat github_summary.md >> $GITHUB_STEP_SUMMARY
281+
# Cache changes and upload github summaries
282+
[ -f "github_summary_exe.md" ] && cat github_summary_exe.md >> $GITHUB_STEP_SUMMARY
283+
[ -f "github_summary_reg.md" ] && cat github_summary_reg.md >> $GITHUB_STEP_SUMMARY
282284
283285
cd "./llvm-ci-perf-results"
284286
git add .

devops/scripts/benchmarks/compare.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ def to_hist(
357357
parser_avg.add_argument(
358358
"--produce-github-summary",
359359
action="store_true",
360-
help=f"Produce regression summary for Github workflow, in file '{options.github_summary_filename}'.",
360+
help=f"Produce regression summary for Github workflow, in file '{options.github_summary_regression_filename}'.",
361361
default=False,
362362
)
363363

@@ -474,7 +474,7 @@ def print_regression(entry: dict, is_warning: bool = False):
474474

475475
if not args.dry_run:
476476
if args.produce_github_summary:
477-
with open(options.github_summary_filename, "a") as f:
477+
with open(options.github_summary_regression_filename, "w") as f:
478478
f.write("\n".join(gh_summary))
479479
exit(1) # Exit 1 to trigger Github test failure
480480

@@ -483,7 +483,7 @@ def print_regression(entry: dict, is_warning: bool = False):
483483
gh_summary.append("")
484484
gh_summary.append("### Regressions")
485485
gh_summary.append("No unexpected regressions found!")
486-
with open(options.github_summary_filename, "a") as f:
486+
with open(options.github_summary_regression_filename, "w") as f:
487487
f.write("\n".join(gh_summary))
488488

489489
else:

devops/scripts/benchmarks/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ def generate_github_summary(execution_stats, failures):
8484

8585
# Write the summary to file
8686
try:
87-
with open(options.github_summary_filename, "w") as f:
87+
with open(options.github_summary_execution_filename, "w") as f:
8888
f.write("\n".join(gh_summary))
89-
log.info(f"GitHub summary written to {options.github_summary_filename}")
89+
log.info(f"GitHub summary with execution stats written to {options.github_summary_execution_filename}")
9090
except Exception as e:
91-
log.error(f"Failed to write GitHub summary: {e}")
91+
log.error(f"Failed to write GitHub summary with execution stats: {e}")
9292

9393

9494
def run_iterations(
@@ -781,7 +781,7 @@ def validate_and_parse_env_args(env_args):
781781
parser.add_argument(
782782
"--produce-github-summary",
783783
action="store_true",
784-
help=f"Produce execution stats summary for Github workflow, in file '{options.github_summary_filename}'.",
784+
help=f"Produce execution stats summary for Github workflow, in file '{options.github_summary_execution_filename}'.",
785785
default=False,
786786
)
787787

devops/scripts/benchmarks/options.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,10 @@ class Options:
9797
# CI scripts vs SYCl build source.
9898
github_repo_override: str = None
9999
git_commit_override: str = None
100-
# Flag and filename used to store Github summary files:
100+
# Flag and filenames used to store Github summary files:
101101
produce_github_summary: bool = False
102-
github_summary_filename: str = "github_summary.md"
102+
github_summary_execution_filename: str = "github_summary_exe.md"
103+
github_summary_regression_filename: str = "github_summary_reg.md"
103104
# Archiving settings
104105
# Archived runs are stored separately from the main dataset but are still accessible
105106
# via the HTML UI when "Include archived runs" is enabled.

0 commit comments

Comments
 (0)