2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-22 10:10:06 +00:00

Use read number of items instead of raw array size in load_names

The load_names benchmark expected the input CSV with domains would fill
the whole item array and it would crash when the number of lines would
be less than that.

Fix the expectations by using the real number or lines read to calculate
the array start and end position for each benchmark thread.
This commit is contained in:
Ondřej Surý 2023-10-06 10:06:36 +02:00
parent 1bd979167e
commit 81f48e11e4
No known key found for this signature in database
GPG Key ID: 2820F37E873DEA41

View File

@ -552,7 +552,7 @@ main(int argc, char *argv[]) {
isc_mem_create(&mem);
map = fun->new (mem);
size_t nitems = ARRAY_SIZE(item) / (nthreads + 1);
size_t nitems = lines / (nthreads + 1);
isc_barrier_init(&barrier, nthreads);