chore(ci): provide hardware name for benchmarks with avx512

This also print a human friendly error from parser if the hardware
cannot be found in the product list.
This commit is contained in:
David Testé
2023-02-24 12:28:53 +01:00
parent 97830e934a
commit b2407d530e
3 changed files with 8 additions and 2 deletions

View File

@@ -90,6 +90,7 @@ jobs:
- name: Parse AVX512 results
run: |
python3 ./ci/benchmark_parser.py target/criterion ${{ env.RESULTS_FILENAME }} \
--hardware ${{ inputs.instance_type }} \
--name-suffix avx512 \
--throughput \
--append-results

View File

@@ -91,6 +91,7 @@ jobs:
- name: Parse AVX512 results
run: |
python3 ./ci/benchmark_parser.py target/criterion ${{ env.RESULTS_FILENAME }} \
--hardware ${{ inputs.instance_type }} \
--walk-subdirs \
--name-suffix avx512 \
--throughput \

View File

@@ -227,8 +227,12 @@ if __name__ == "__main__":
print("Throughput computation enabled")
ec2_costs = json.loads(
pathlib.Path("ci/ec2_products_cost.json").read_text(encoding="utf-8"))
hardware_cost = abs(ec2_costs[args.hardware])
print(f"Hardware hourly cost: {hardware_cost} $/h")
try:
hardware_cost = abs(ec2_costs[args.hardware])
print(f"Hardware hourly cost: {hardware_cost} $/h")
except KeyError:
print(f"Cannot find hardware hourly cost for '{args.hardware}'")
sys.exit(1)
results = recursive_parse(raw_results, args.walk_subdirs, args.name_suffix, args.throughput,
hardware_cost)