summaryrefslogtreecommitdiff
path: root/mysql-test/mysql-test-run.pl
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2020-02-26 19:39:26 +0100
committerSergei Golubchik <serg@mariadb.org>2020-03-14 12:38:26 +0100
commit5c1ed707a3d03a081fde2b2c960998d797757adf (patch)
treeccf01b1b3a20b6e8203249dbe6820bd921452322 /mysql-test/mysql-test-run.pl
parent0fe3d6d56371b2b8ae5e92e80270a112d9bf4910 (diff)
downloadmariadb-git-5c1ed707a3d03a081fde2b2c960998d797757adf.tar.gz
mtr: update heuristics for --parallel=auto
to work better for CPUs with more than 2000 bogomips. old behavior is preserved if less than 2500 bogomips.
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-xmysql-test/mysql-test-run.pl5
1 files changed, 1 insertions, 4 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 07cd4fa5392..cb7e6666800 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -441,11 +441,8 @@ sub main {
if ( $opt_parallel eq "auto" ) {
# Try to find a suitable value for number of workers
my $sys_info= My::SysInfo->new();
+ $opt_parallel= $sys_info->num_cpus() + int($sys_info->min_bogomips()/500)-4;
- $opt_parallel= $sys_info->num_cpus();
- for my $limit (2000, 1500, 1000, 500){
- $opt_parallel-- if ($sys_info->min_bogomips() < $limit);
- }
my $max_par= $ENV{MTR_MAX_PARALLEL} || 8;
$opt_parallel= $max_par if ($opt_parallel > $max_par);
$opt_parallel= $num_tests if ($opt_parallel > $num_tests);