From 043598070d4cb62facfedf59a87adb9e2a3cb7da Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 5 Mar 2019 14:27:35 +0100 Subject: add function to scale thread to available cpus --- src/mysql.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/mysql.py') diff --git a/src/mysql.py b/src/mysql.py index 96904b6..d3eb528 100644 --- a/src/mysql.py +++ b/src/mysql.py @@ -1,6 +1,5 @@ import copy import matplotlib.pyplot as plt -import multiprocessing import numpy as np import os import re @@ -36,7 +35,7 @@ class Benchmark_MYSQL(Benchmark): if "hoard" in self.allocators: del(self.allocators["hoard"]) - self.args = {"nthreads": range(1, multiprocessing.cpu_count() + 1)} + self.args = {"nthreads": Benchmark.scale_threads_for_cpus(1)} self.cmd = cmd self.measure_cmd = "" -- cgit v1.2.3