Merge pull request #14591 from kaspar030/tests_bench_sys_base64_reduce_iterations
tests/bench_sys_base64: reduce test iterations (10000 -> 1000)
This commit is contained in:
commit
3b4c31c76c
@ -75,24 +75,24 @@ int main(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
start = xtimer_now_usec();
|
start = xtimer_now_usec();
|
||||||
for (unsigned i = 0; i < 10000; i++) {
|
for (unsigned i = 0; i < 1000; i++) {
|
||||||
size = sizeof(buf);
|
size = sizeof(buf);
|
||||||
base64_encode(input, sizeof(input), buf, &size);
|
base64_encode(input, sizeof(input), buf, &size);
|
||||||
}
|
}
|
||||||
stop = xtimer_now_usec();
|
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_u32_dec(stop - start);
|
||||||
print_str(" µs\n");
|
print_str(" µs\n");
|
||||||
|
|
||||||
start = xtimer_now_usec();
|
start = xtimer_now_usec();
|
||||||
for (unsigned i = 0; i < 10000; i++) {
|
for (unsigned i = 0; i < 1000; i++) {
|
||||||
size = sizeof(buf);
|
size = sizeof(buf);
|
||||||
base64_decode(base64, sizeof(base64), buf, &size);
|
base64_decode(base64, sizeof(base64), buf, &size);
|
||||||
}
|
}
|
||||||
stop = xtimer_now_usec();
|
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_u32_dec(stop - start);
|
||||||
print_str(" µs\n");
|
print_str(" µs\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -13,8 +13,8 @@ from testrunner import run
|
|||||||
def testfunc(child):
|
def testfunc(child):
|
||||||
child.expect_exact("Verifying that base64 encoding works for benchmark input: OK\r\n")
|
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_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"Encoding 1\.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"Decoding 1\.000 x 96 bytes \(128 bytes in base64\): [0-9]+ µs\r\n")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user