diff options
author | Robert Norton <rmn30@cam.ac.uk> | 2019-06-27 15:35:17 +0100 |
---|---|---|
committer | Robert Norton <rmn30@cam.ac.uk> | 2019-06-27 15:35:17 +0100 |
commit | e09b35a03c64400d050161aa79d1465b1557ea0b (patch) | |
tree | 97bd1f3dfb828a524cd678ab19ca25317eb89c73 /test/get_perf.py | |
parent | 21a1d180b49da0ae934eaa0aaeb2f3b617cf014d (diff) | |
download | sail-riscv-e09b35a03c64400d050161aa79d1465b1557ea0b.zip sail-riscv-e09b35a03c64400d050161aa79d1465b1557ea0b.tar.gz sail-riscv-e09b35a03c64400d050161aa79d1465b1557ea0b.tar.bz2 |
Fixes for get_perf.py script: fix name of tests directory and cope with uc-p test being so fast the script it takes zero microseconds.
Diffstat (limited to 'test/get_perf.py')
-rwxr-xr-x | test/get_perf.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/get_perf.py b/test/get_perf.py index c3e94cf..1570cac 100755 --- a/test/get_perf.py +++ b/test/get_perf.py @@ -24,14 +24,14 @@ def test_perf(d, test_pat, test_type): total_insts += insts total_msecs += msecs - Kips = total_insts/total_msecs + Kips = total_insts/total_msecs if total_msecs != 0 else float("nan") print("Average {0} performance: {1} Kips".format(test_type, Kips)) def get_test_pat(iset, emode): return "rv64{0}-{1}-*.cout".format(iset, emode) if __name__ == '__main__': - test_dir = os.path.join(os.path.dirname(__file__), "tests") + test_dir = os.path.join(os.path.dirname(__file__), "riscv-tests") for mode in ["p", "v"]: test_perf(test_dir, get_test_pat("ui", mode), "ui-{0}".format(mode)) test_perf(test_dir, get_test_pat("um", mode), "um-{0}".format(mode)) |