From 54027355edd96eb5b596f7483076573fa5bbf520 Mon Sep 17 00:00:00 2001 From: Tobias Ribizel Date: Wed, 22 Nov 2023 10:37:32 +0100 Subject: [PATCH] more stable output --- benchmark/tools/compare.py | 2 +- benchmark/tools/compare_test.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmark/tools/compare.py b/benchmark/tools/compare.py index 8de109fe34a..e0f79e90988 100755 --- a/benchmark/tools/compare.py +++ b/benchmark/tools/compare.py @@ -160,7 +160,7 @@ def compare_main(args: list): results = {} - for key in set(baseline_json.keys()).intersection(comparison_json.keys()): + for key in sorted_key_intersection(baseline_json, comparison_json): results[key] = compare(baseline_json[key], comparison_json[key]) outliers = {} diff --git a/benchmark/tools/compare_test.py b/benchmark/tools/compare_test.py index 1b906c63b45..83e2ee5dbda 100644 --- a/benchmark/tools/compare_test.py +++ b/benchmark/tools/compare_test.py @@ -203,8 +203,6 @@ def test_complex(capsys): captured = capsys.readouterr() ref_out = { "results": [ - {"blas": {"axpy": {"time.ratio": 1.0}}, "k": 2, "m": 3, "n": 1, "r": 4}, - {"size": 100, "spmv": {"csr": {"time.ratio": 1.0}}, "stencil": "7pt"}, { "filename": "mtx", "solver": { @@ -218,6 +216,8 @@ def test_complex(capsys): } }, }, + {"blas": {"axpy": {"time.ratio": 1.0}}, "k": 2, "m": 3, "n": 1, "r": 4}, + {"size": 100, "spmv": {"csr": {"time.ratio": 1.0}}, "stencil": "7pt"}, ], "outliers": {}, }