Fix the payload size to 1 MiB in flush test
This commit is contained in:
parent
221e1a8d19
commit
afc4ed48b5
@ -69,7 +69,8 @@ int main(void)
|
|||||||
|
|
||||||
init();
|
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);
|
payload_buf = calloc(1, payload_size);
|
||||||
|
|
||||||
if(!payload_buf)
|
if(!payload_buf)
|
||||||
@ -102,8 +103,9 @@ int main(void)
|
|||||||
|
|
||||||
fprintf(stderr, "mean %f ms\n", mean);
|
fprintf(stderr, "mean %f ms\n", mean);
|
||||||
|
|
||||||
|
/* It should be able to write 1 MiB in less than 1 ms */
|
||||||
if (mean > 1.0) {
|
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);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user