From 53ac585bea0a606e39e4d87a917732f506757150 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 28 Nov 2019 14:11:09 +0100 Subject: fix scale factor > 0 for systems with more than 10 cpus --- src/benchmark.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/benchmark.py b/src/benchmark.py index 8abfbc4..15c4fee 100644 --- a/src/benchmark.py +++ b/src/benchmark.py @@ -60,7 +60,7 @@ class Benchmark: Return a list of numbers between start and multiprocessing.cpu_count() * factor with len <= steps.""" - max_threads = multiprocessing.cpu_count() * factor + max_threads = int(multiprocessing.cpu_count() * factor) if steps > max_threads - min_threads + 1: return list(range(min_threads, int(max_threads) + 1)) @@ -73,7 +73,7 @@ class Benchmark: if entries > steps - 1: return sorted(list(set([min_threads] + nthreads + [max_threads]))) - nthreads = [(i + 1) * factor for i in range(entries)] + nthreads = [int((i + 1) * factor) for i in range(int(entries))] divider *= 2 @staticmethod -- cgit v1.2.3