From 0eb47b3415e355add689e56b28478bc6f9490765 Mon Sep 17 00:00:00 2001 From: Alexander Kuzmenkov Date: Mon, 2 Mar 2020 19:50:18 +0300 Subject: [PATCH 1/2] Change endless performance tests (5) --- dbms/tests/performance/if_string_const.xml | 12 +++++------- dbms/tests/performance/if_to_multiif.xml | 13 ++++++------- dbms/tests/performance/information_value.xml | 7 +++---- dbms/tests/performance/linear_regression.xml | 1 - .../performance/random_printable_ascii.xml | 17 ++++++++--------- 5 files changed, 22 insertions(+), 28 deletions(-) diff --git a/dbms/tests/performance/if_string_const.xml b/dbms/tests/performance/if_string_const.xml index 15a281685ae..5b06440473f 100644 --- a/dbms/tests/performance/if_string_const.xml +++ b/dbms/tests/performance/if_string_const.xml @@ -1,16 +1,14 @@ - once + loop - 1000 10000 - - SELECT count() FROM system.numbers WHERE NOT ignore(rand() % 2 ? 'hello' : 'world') - SELECT count() FROM system.numbers WHERE NOT ignore(rand() % 2 ? 'hello' : '') - SELECT count() FROM system.numbers WHERE NOT ignore(rand() % 2 ? toFixedString('hello', 5) : toFixedString('world', 5)) - SELECT count() FROM system.numbers WHERE NOT ignore(rand() % 2 ? '' : toFixedString('world', 5)) + SELECT count() FROM numbers(1000000) WHERE NOT ignore(rand() % 2 ? 'hello' : 'world') + SELECT count() FROM numbers(1000000) WHERE NOT ignore(rand() % 2 ? 'hello' : '') + SELECT count() FROM numbers(1000000) WHERE NOT ignore(rand() % 2 ? toFixedString('hello', 5) : toFixedString('world', 5)) + SELECT count() FROM numbers(1000000) WHERE NOT ignore(rand() % 2 ? '' : toFixedString('world', 5)) diff --git a/dbms/tests/performance/if_to_multiif.xml b/dbms/tests/performance/if_to_multiif.xml index 54d4b8ba842..7dee667a1bd 100644 --- a/dbms/tests/performance/if_to_multiif.xml +++ b/dbms/tests/performance/if_to_multiif.xml @@ -1,19 +1,18 @@ - once + loop - 1000 10000 - - - - + + + + diff --git a/dbms/tests/performance/information_value.xml b/dbms/tests/performance/information_value.xml index ed054eda40d..f5b73a18abc 100644 --- a/dbms/tests/performance/information_value.xml +++ b/dbms/tests/performance/information_value.xml @@ -2,7 +2,7 @@ loop - test.hits + hits_100m_single @@ -10,12 +10,11 @@ 10000 - 5000 20000 - SELECT categoricalInformationValue(Age < 15, IsMobile) - SELECT categoricalInformationValue(Age < 15, Age >= 15 and Age < 30, Age >= 30 and Age < 45, Age >= 45 and Age < 60, Age >= 60, IsMobile) + SELECT categoricalInformationValue(Age < 15, IsMobile) from hits_100m_single + SELECT categoricalInformationValue(Age < 15, Age >= 15 and Age < 30, Age >= 30 and Age < 45, Age >= 45 and Age < 60, Age >= 60, IsMobile) from hits_100m_single diff --git a/dbms/tests/performance/linear_regression.xml b/dbms/tests/performance/linear_regression.xml index 50634b6a60a..0b4892f71ec 100644 --- a/dbms/tests/performance/linear_regression.xml +++ b/dbms/tests/performance/linear_regression.xml @@ -3,7 +3,6 @@ - 3000 10000 diff --git a/dbms/tests/performance/random_printable_ascii.xml b/dbms/tests/performance/random_printable_ascii.xml index b37469c0aee..5fca705464e 100644 --- a/dbms/tests/performance/random_printable_ascii.xml +++ b/dbms/tests/performance/random_printable_ascii.xml @@ -1,19 +1,18 @@ - once + loop - 4000 10000 - SELECT count() FROM system.numbers WHERE NOT ignore(randomPrintableASCII(10)) - SELECT count() FROM system.numbers WHERE NOT ignore(randomPrintableASCII(100)) - SELECT count() FROM system.numbers WHERE NOT ignore(randomPrintableASCII(1000)) - SELECT count() FROM system.numbers WHERE NOT ignore(randomPrintableASCII(10000)) - SELECT count() FROM system.numbers WHERE NOT ignore(randomPrintableASCII(rand() % 10)) - SELECT count() FROM system.numbers WHERE NOT ignore(randomPrintableASCII(rand() % 100)) - SELECT count() FROM system.numbers WHERE NOT ignore(randomPrintableASCII(rand() % 1000)) + SELECT count() FROM numbers(1000000) WHERE NOT ignore(randomPrintableASCII(10)) + SELECT count() FROM numbers(1000000) WHERE NOT ignore(randomPrintableASCII(100)) + SELECT count() FROM numbers(1000000) WHERE NOT ignore(randomPrintableASCII(1000)) + SELECT count() FROM numbers(1000000) WHERE NOT ignore(randomPrintableASCII(10000)) + SELECT count() FROM numbers(1000000) WHERE NOT ignore(randomPrintableASCII(rand() % 10)) + SELECT count() FROM numbers(1000000) WHERE NOT ignore(randomPrintableASCII(rand() % 100)) + SELECT count() FROM numbers(1000000) WHERE NOT ignore(randomPrintableASCII(rand() % 1000)) From 825f86759171c411cf950af09b8b6dd23794fd3c Mon Sep 17 00:00:00 2001 From: Alexander Kuzmenkov Date: Tue, 3 Mar 2020 13:09:47 +0300 Subject: [PATCH 2/2] fixup --- dbms/tests/performance/if_to_multiif.xml | 6 ++++++ dbms/tests/performance/linear_regression.xml | 11 ++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/dbms/tests/performance/if_to_multiif.xml b/dbms/tests/performance/if_to_multiif.xml index 7dee667a1bd..03f528d6349 100644 --- a/dbms/tests/performance/if_to_multiif.xml +++ b/dbms/tests/performance/if_to_multiif.xml @@ -7,6 +7,12 @@ + + + nonexistent_table_if_multiif + + diff --git a/dbms/tests/performance/linear_regression.xml b/dbms/tests/performance/linear_regression.xml index 0b4892f71ec..c358e21af05 100644 --- a/dbms/tests/performance/linear_regression.xml +++ b/dbms/tests/performance/linear_regression.xml @@ -9,6 +9,7 @@ test.hits + hits_100m_single @@ -16,17 +17,17 @@ CREATE TABLE test_model engine = Memory as select stochasticLinearRegressionState(0.0001)(Age, Income, ParamPrice, Robotness, RefererHash) as state from test.hits - WITH (SELECT stochasticLinearRegressionState(0.0001, 0, 15)(Age, Income, ParamPrice, Robotness, RefererHash) FROM test.hits) AS model SELECT 1 - SELECT stochasticLinearRegression(Age, Income, ParamPrice, Robotness, RefererHash) FROM test.hits + SELECT stochasticLinearRegressionState(0.0001, 0, 15)(Age, Income, ParamPrice, Robotness, RefererHash) FROM test.hits FORMAT Null + SELECT stochasticLinearRegression(Age, Income, ParamPrice, Robotness, RefererHash) FROM test.hits FORMAT Null - WITH (SELECT stochasticLinearRegressionState(0.0001, 0, 15, 'Momentum')(Age, Income, ParamPrice, Robotness, RefererHash) FROM test.hits) AS model SELECT 1 + SELECT stochasticLinearRegressionState(0.0001, 0, 15, 'Momentum')(Age, Income, ParamPrice, Robotness, RefererHash) FROM hits_100m_single FORMAT Null - WITH (SELECT stochasticLinearRegressionState(0.0001, 0, 15, 'Nesterov')(Age, Income, ParamPrice, Robotness, RefererHash) FROM test.hits) AS model SELECT 1 + SELECT stochasticLinearRegressionState(0.0001, 0, 15, 'Nesterov')(Age, Income, ParamPrice, Robotness, RefererHash) FROM hits_100m_single FORMAT Null - with (SELECT state FROM test_model) as model select evalMLMethod(model, Income, ParamPrice, Robotness, RefererHash) from test.hits + WITH (SELECT state FROM test_model) AS model SELECT evalMLMethod(model, Income, ParamPrice, Robotness, RefererHash) FROM hits_100m_single FORMAT Null DROP TABLE IF EXISTS test_model