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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user