Lines Matching refs:nthreads
187 def run_throughput_test(func, args, nthreads): argument
188 assert nthreads >= 1
197 if nthreads == 1:
221 for i in range(nthreads):
229 while len(ready) < nthreads:
234 start_cond.notify(nthreads)
245 nthreads = 1
247 while nthreads <= max_threads:
248 results = run_throughput_test(func, args, nthreads)
252 print("threads=%d: %d" % (nthreads, speed), end="")
258 nthreads += 1
294 def run_latency_test(func, args, nthreads): argument
310 if nthreads > 0:
328 for i in range(nthreads):
335 while len(ready) < nthreads:
349 start_cond.notify(nthreads)
380 nthreads = 0
381 while nthreads <= max_threads:
382 results = run_latency_test(func, args, nthreads)
389 print("CPU threads=%d: %d ms. (std dev: %d ms.)" % (nthreads, avg, dev), end="")
392 nthreads += 1
427 def run_bandwidth_test(func, args, nthreads): argument
442 if nthreads > 0:
460 for i in range(nthreads):
467 while len(ready) < nthreads:
483 start_cond.notify(nthreads)
507 nthreads = 0
509 while nthreads <= max_threads:
510 results = run_bandwidth_test(func, args, nthreads)
513 print("CPU threads=%d: %.1f" % (nthreads, speed), end="")
519 nthreads += 1
593 run_throughput_tests(options.nthreads)
598 run_latency_tests(options.nthreads)
603 run_bandwidth_tests(options.nthreads)