Lines Matching refs:nthreads
196 def run_throughput_test(func, args, nthreads): argument
197 assert nthreads >= 1
206 if nthreads == 1:
230 for i in range(nthreads):
238 while len(ready) < nthreads:
243 start_cond.notify(nthreads)
254 nthreads = 1
256 while nthreads <= max_threads:
257 results = run_throughput_test(func, args, nthreads)
261 print("threads=%d: %d" % (nthreads, speed), end="")
267 nthreads += 1
300 def run_latency_test(func, args, nthreads): argument
316 if nthreads > 0:
334 for i in range(nthreads):
341 while len(ready) < nthreads:
355 start_cond.notify(nthreads)
385 nthreads = 0
386 while nthreads <= max_threads:
387 results = run_latency_test(func, args, nthreads)
394 print("CPU threads=%d: %d ms. (std dev: %d ms.)" % (nthreads, avg, dev), end="")
397 nthreads += 1
432 def run_bandwidth_test(func, args, nthreads): argument
447 if nthreads > 0:
465 for i in range(nthreads):
472 while len(ready) < nthreads:
488 start_cond.notify(nthreads)
512 nthreads = 0
514 while nthreads <= max_threads:
515 results = run_bandwidth_test(func, args, nthreads)
518 print("CPU threads=%d: %.1f" % (nthreads, speed), end="")
524 nthreads += 1
596 run_throughput_tests(options.nthreads)
601 run_latency_tests(options.nthreads)
606 run_bandwidth_tests(options.nthreads)