Skip to content

Commit

Permalink
Update the number of events to process based on the number of threads
Browse files Browse the repository at this point in the history
  • Loading branch information
fwyzard committed Sep 19, 2022
1 parent fc1b710 commit 0eb3f78
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scan
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ if __name__ == "__main__":
min_step = 1 # minimum is 1
max_step = None # None to guess based on the number of available cores (or threads) and concurrent jobs

##############################################################################
events_extra_per_thread = 0 # increase by this amount the number of events per thread
events_limit = 0 # if not 0, limit the total number of events to be processed

# print a system overview
info()
Expand Down Expand Up @@ -95,6 +96,14 @@ if __name__ == "__main__":
base = base + '/'
step_opt['logdir'] = base + 'scan_%d' % step

# update the number of events to process based on the number of threads
if events_extra_per_thread > 0:
step_opt['events'] = options['events'] + events_extra_per_thread * step_opt['threads']

if events_limit > 0:
if step_opt['events'] > events_limit:
step_opt['events'] = events_limit

# benchmark reading the input data
if run_io_benchmark:
print('Benchmarking only I/O')
Expand Down

0 comments on commit 0eb3f78

Please sign in to comment.