From 3420fcf4367b5cee9f5d3de2bf698d33b115fc6a Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Tue, 21 Jul 2020 13:27:32 +0200 Subject: [PATCH] tests/bench_sys_base64: reduce test iterations (10000 -> 1000) --- tests/bench_sys_base64/main.c | 8 ++++---- tests/bench_sys_base64/tests/01-run.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/bench_sys_base64/main.c b/tests/bench_sys_base64/main.c index 3c33a7301a..265e9228d0 100644 --- a/tests/bench_sys_base64/main.c +++ b/tests/bench_sys_base64/main.c @@ -75,24 +75,24 @@ int main(void) { } start = xtimer_now_usec(); - for (unsigned i = 0; i < 10000; i++) { + for (unsigned i = 0; i < 1000; i++) { size = sizeof(buf); base64_encode(input, sizeof(input), buf, &size); } stop = xtimer_now_usec(); - print_str("Encoding 10.000 x 96 bytes (128 bytes in base64): "); + print_str("Encoding 1.000 x 96 bytes (128 bytes in base64): "); print_u32_dec(stop - start); print_str(" µs\n"); start = xtimer_now_usec(); - for (unsigned i = 0; i < 10000; i++) { + for (unsigned i = 0; i < 1000; i++) { size = sizeof(buf); base64_decode(base64, sizeof(base64), buf, &size); } stop = xtimer_now_usec(); - print_str("Decoding 10.000 x 96 bytes (128 bytes in base64): "); + print_str("Decoding 1.000 x 96 bytes (128 bytes in base64): "); print_u32_dec(stop - start); print_str(" µs\n"); return 0; diff --git a/tests/bench_sys_base64/tests/01-run.py b/tests/bench_sys_base64/tests/01-run.py index 7fa6c23f3c..3b37d1d325 100755 --- a/tests/bench_sys_base64/tests/01-run.py +++ b/tests/bench_sys_base64/tests/01-run.py @@ -13,8 +13,8 @@ from testrunner import run def testfunc(child): child.expect_exact("Verifying that base64 encoding works for benchmark input: OK\r\n") child.expect_exact("Verifying that base64 decoding works for benchmark input: OK\r\n") - child.expect(r"Encoding 10\.000 x 96 bytes \(128 bytes in base64\): [0-9]+ µs\r\n") - child.expect(r"Decoding 10\.000 x 96 bytes \(128 bytes in base64\): [0-9]+ µs\r\n") + child.expect(r"Encoding 1\.000 x 96 bytes \(128 bytes in base64\): [0-9]+ µs\r\n") + child.expect(r"Decoding 1\.000 x 96 bytes \(128 bytes in base64\): [0-9]+ µs\r\n") if __name__ == "__main__":