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:
parent
1bd979167e
commit
81f48e11e4
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user