From afc4ed48b56673adabbd547c54f7e4253995836d Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Thu, 13 Jan 2022 13:06:34 +0100 Subject: [PATCH] Fix the payload size to 1 MiB in flush test --- test/flush-overhead.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/flush-overhead.c b/test/flush-overhead.c index 9fac9b2..498d17b 100644 --- a/test/flush-overhead.c +++ b/test/flush-overhead.c @@ -69,7 +69,8 @@ int main(void) init(); - payload_size = (size_t) (0.5 * (double) OVNI_MAX_EV_BUF); + /* Use 1 MiB of payload */ + payload_size = 1024 * 1024; payload_buf = calloc(1, payload_size); if(!payload_buf) @@ -102,8 +103,9 @@ int main(void) fprintf(stderr, "mean %f ms\n", mean); + /* It should be able to write 1 MiB in less than 1 ms */ if (mean > 1.0) { - fprintf(stderr, "too much time: %f ms\n", mean); + fprintf(stderr, "took too much time to flush: %f ms\n", mean); exit(EXIT_FAILURE); }