Skip to content

Commit 8a3d947

Browse files
committed
change defaults in python script args
1 parent 8db13dc commit 8a3d947

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ on:
66
env:
77
GIT_CONFIG_GLOBAL: "/root/.gitconfig" # fix path in container (https://github.com/actions/runner/issues/2033)
88

9-
defaults:
10-
run:
11-
shell: "bash"
12-
139
jobs:
1410

1511
### LINT ###
@@ -91,9 +87,7 @@ jobs:
9187
- name: "Make comparison report"
9288
run: |
9389
python ./build/ci/compare_benchmarks.py \
94-
--alert-threshold 7 \
95-
--aggregation mean \
96-
--sha-file "$BENCH_MASTER_SHA_FILE_PATH" \
90+
--old-commit-sha-path "$BENCH_MASTER_SHA_FILE_PATH" \
9791
"$BENCH_MASTER_FILE_PATH" \
9892
benchmark.txt \
9993
>> performance-report.md

build/ci/compare_benchmarks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,14 +201,14 @@ def build_report_header(old_file, sha_file: str) -> str:
201201
def main():
202202
parser = argparse.ArgumentParser(description="Compare go test -bench results in markdown format")
203203
parser.add_argument(
204-
"--alert-threshold", type=float, default=5,
204+
"--alert-threshold", type=float, default=7,
205205
help="Percent change threshold for adding emoji alerts"
206206
)
207207
parser.add_argument(
208208
"--aggregation", choices=["mean", "median"], default="mean",
209209
help="Aggregation method for multiple runs of the same benchmark"
210210
)
211-
parser.add_argument("--sha-file", help="Path to file with sha commit of the old benchmark")
211+
parser.add_argument("--old-commit-sha-path", help="Path to file with sha commit of the old benchmark")
212212
parser.add_argument("old_file", help="Path to old benchmark results file", nargs='?', default="")
213213
parser.add_argument("new_file", help="Path to new benchmark results file")
214214
args = parser.parse_args()
@@ -219,7 +219,7 @@ def main():
219219

220220
new_metrics = aggregate_results(parse_metrics_file(args.new_file), args.aggregation)
221221

222-
print(build_report_header(args.old_file, args.sha_file))
222+
print(build_report_header(args.old_file, args.old_commit_sha_path))
223223
print(compare_benchmarks_df(old_metrics, new_metrics, alert_threshold=args.alert_threshold))
224224

225225

0 commit comments

Comments
 (0)