(opts)
| 382 | |
| 383 | |
| 384 | def initialize_threads(opts): |
| 385 | if opts.threads == -1: |
| 386 | cpus = determine_num_threads_and_affinity() |
| 387 | else: |
| 388 | cpus = [None] * opts.threads # don't set affinity |
| 389 | |
| 390 | print(f"Running benchmarks with {len(cpus)} threads") |
| 391 | for cpu in cpus: |
| 392 | inq = queue.Queue() |
| 393 | outq = queue.Queue() |
| 394 | in_queues.append(inq) |
| 395 | out_queues.append(outq) |
| 396 | t = threading.Thread(target=thread_run, args=(cpu, inq, outq), daemon=True) |
| 397 | threads.append(t) |
| 398 | t.start() |
| 399 | |
| 400 | |
| 401 | def main(opts): |
no test coverage detected
searching dependent graphs…