未验证 提交 86eb3f00 编写于 作者: A alexey-milovidov 提交者: GitHub

Merge pull request #9469 from ClickHouse/aku/endless-tests5

Change endless performance tests (5)
<test>
<type>once</type>
<type>loop</type>
<stop_conditions>
<any_of>
<average_speed_not_changing_for_ms>1000</average_speed_not_changing_for_ms>
<total_time_ms>10000</total_time_ms>
</any_of>
</stop_conditions>
<query>SELECT count() FROM system.numbers WHERE NOT ignore(rand() % 2 ? 'hello' : 'world')</query>
<query>SELECT count() FROM system.numbers WHERE NOT ignore(rand() % 2 ? 'hello' : '')</query>
<query>SELECT count() FROM system.numbers WHERE NOT ignore(rand() % 2 ? toFixedString('hello', 5) : toFixedString('world', 5))</query>
<query>SELECT count() FROM system.numbers WHERE NOT ignore(rand() % 2 ? '' : toFixedString('world', 5))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(rand() % 2 ? 'hello' : 'world')</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(rand() % 2 ? 'hello' : '')</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(rand() % 2 ? toFixedString('hello', 5) : toFixedString('world', 5))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(rand() % 2 ? '' : toFixedString('world', 5))</query>
</test>
<test>
<type>once</type>
<type>loop</type>
<stop_conditions>
<any_of>
<average_speed_not_changing_for_ms>1000</average_speed_not_changing_for_ms>
<total_time_ms>10000</total_time_ms>
</any_of>
</stop_conditions>
<preconditions>
<!-- sum() does not work for String values, need to investigate what
this test meant. Disable for now. -->
<table_exists>nonexistent_table_if_multiif</table_exists>
<precondition>
<query><![CDATA[ WITH number AS x SELECT sum(x < 1 ? 1 : (x < 5 ? 2 : 3)) FROM system.numbers ]]></query>
<query><![CDATA[ WITH number AS x SELECT sum(x < 1 ? '1' : (x < 5 ? '2' : '3')) FROM system.numbers ]]></query>
<query><![CDATA[ WITH number AS x SELECT sum(x < 1 ? 1 : (x < 5 ? 2 : (x < 10 ? 3 : (x % 2 ? 4 : 5)))) FROM system.numbers ]]></query>
<query><![CDATA[ WITH number AS x SELECT sum(x < 1 ? '1' : (x < 5 ? '2' : (x < 10 ? '3' : (x % 2 ? '4' : '5')))) FROM system.numbers ]]></query>
<query><![CDATA[ WITH number AS x SELECT sum(x < 1 ? 1 : (x < 5 ? 2 : 3)) FROM numbers(1000000) ]]></query>
<query><![CDATA[ WITH number AS x SELECT sum(x < 1 ? '1' : (x < 5 ? '2' : '3')) FROM numbers(1000000) ]]></query>
<query><![CDATA[ WITH number AS x SELECT sum(x < 1 ? 1 : (x < 5 ? 2 : (x < 10 ? 3 : (x % 2 ? 4 : 5)))) FROM numbers(1000000) ]]></query>
<query><![CDATA[ WITH number AS x SELECT sum(x < 1 ? '1' : (x < 5 ? '2' : (x < 10 ? '3' : (x % 2 ? '4' : '5')))) FROM numbers(1000000) ]]></query>
<query><![CDATA[
WITH number AS x, x = 1 ? 1 : (x = 2 ? 2 : (x = 3 ? 3 : (x = 4 ? 4 : (x = 5 ? 5 : (x = 6 ? 6 : (x = 7 ? 7 : (x = 8 ? 8 : (x = 9 ? 9 : (x = 10 ? 10 : (x = 11 ? 11 : (x = 12 ? 12 : (x = 13 ? 13 : (x = 14 ? 14 : (x = 15 ? 15 : (x = 16 ? 16 : (x = 17 ? 17 : (x = 18 ? 18 : (x = 19 ? 19 : 20)))))))))))))))))) AS res SELECT sum(res) FROM system.numbers
WITH number AS x, x = 1 ? 1 : (x = 2 ? 2 : (x = 3 ? 3 : (x = 4 ? 4 : (x = 5 ? 5 : (x = 6 ? 6 : (x = 7 ? 7 : (x = 8 ? 8 : (x = 9 ? 9 : (x = 10 ? 10 : (x = 11 ? 11 : (x = 12 ? 12 : (x = 13 ? 13 : (x = 14 ? 14 : (x = 15 ? 15 : (x = 16 ? 16 : (x = 17 ? 17 : (x = 18 ? 18 : (x = 19 ? 19 : 20)))))))))))))))))) AS res SELECT sum(res) FROM numbers(1000000)
]]></query>
</test>
......@@ -2,7 +2,7 @@
<type>loop</type>
<preconditions>
<table_exists>test.hits</table_exists>
<table_exists>hits_100m_single</table_exists>
</preconditions>
<stop_conditions>
......@@ -10,12 +10,11 @@
<total_time_ms>10000</total_time_ms>
</all_of>
<any_of>
<average_speed_not_changing_for_ms>5000</average_speed_not_changing_for_ms>
<total_time_ms>20000</total_time_ms>
</any_of>
</stop_conditions>
<query>SELECT categoricalInformationValue(Age &lt; 15, IsMobile)</query>
<query>SELECT categoricalInformationValue(Age &lt; 15, Age &gt;= 15 and Age &lt; 30, Age &gt;= 30 and Age &lt; 45, Age &gt;= 45 and Age &lt; 60, Age &gt;= 60, IsMobile)</query>
<query>SELECT categoricalInformationValue(Age &lt; 15, IsMobile) from hits_100m_single</query>
<query>SELECT categoricalInformationValue(Age &lt; 15, Age &gt;= 15 and Age &lt; 30, Age &gt;= 30 and Age &lt; 45, Age &gt;= 45 and Age &lt; 60, Age &gt;= 60, IsMobile) from hits_100m_single</query>
</test>
......@@ -3,13 +3,13 @@
<stop_conditions>
<any_of>
<average_speed_not_changing_for_ms>3000</average_speed_not_changing_for_ms>
<total_time_ms>10000</total_time_ms>
</any_of>
</stop_conditions>
<preconditions>
<table_exists>test.hits</table_exists>
<table_exists>hits_100m_single</table_exists>
</preconditions>
......@@ -17,17 +17,17 @@
<create_query>CREATE TABLE test_model engine = Memory as select stochasticLinearRegressionState(0.0001)(Age, Income, ParamPrice, Robotness, RefererHash) as state from test.hits</create_query>
<!-- Check model fit -->
<query>WITH (SELECT stochasticLinearRegressionState(0.0001, 0, 15)(Age, Income, ParamPrice, Robotness, RefererHash) FROM test.hits) AS model SELECT 1</query>
<query>SELECT stochasticLinearRegression(Age, Income, ParamPrice, Robotness, RefererHash) FROM test.hits</query>
<query>SELECT stochasticLinearRegressionState(0.0001, 0, 15)(Age, Income, ParamPrice, Robotness, RefererHash) FROM test.hits FORMAT Null</query>
<query>SELECT stochasticLinearRegression(Age, Income, ParamPrice, Robotness, RefererHash) FROM test.hits FORMAT Null</query>
<!-- Check model fit with Momentum -->
<query>WITH (SELECT stochasticLinearRegressionState(0.0001, 0, 15, 'Momentum')(Age, Income, ParamPrice, Robotness, RefererHash) FROM test.hits) AS model SELECT 1</query>
<query>SELECT stochasticLinearRegressionState(0.0001, 0, 15, 'Momentum')(Age, Income, ParamPrice, Robotness, RefererHash) FROM hits_100m_single FORMAT Null</query>
<!-- Check model fit with Nesterov -->
<query>WITH (SELECT stochasticLinearRegressionState(0.0001, 0, 15, 'Nesterov')(Age, Income, ParamPrice, Robotness, RefererHash) FROM test.hits) AS model SELECT 1</query>
<query>SELECT stochasticLinearRegressionState(0.0001, 0, 15, 'Nesterov')(Age, Income, ParamPrice, Robotness, RefererHash) FROM hits_100m_single FORMAT Null</query>
<!-- Check model predict -->
<query>with (SELECT state FROM test_model) as model select evalMLMethod(model, Income, ParamPrice, Robotness, RefererHash) from test.hits</query>
<query>WITH (SELECT state FROM test_model) AS model SELECT evalMLMethod(model, Income, ParamPrice, Robotness, RefererHash) FROM hits_100m_single FORMAT Null</query>
<drop_query>DROP TABLE IF EXISTS test_model</drop_query>
</test>
<test>
<type>once</type>
<type>loop</type>
<stop_conditions>
<any_of>
<average_speed_not_changing_for_ms>4000</average_speed_not_changing_for_ms>
<total_time_ms>10000</total_time_ms>
</any_of>
</stop_conditions>
<query>SELECT count() FROM system.numbers WHERE NOT ignore(randomPrintableASCII(10))</query>
<query>SELECT count() FROM system.numbers WHERE NOT ignore(randomPrintableASCII(100))</query>
<query>SELECT count() FROM system.numbers WHERE NOT ignore(randomPrintableASCII(1000))</query>
<query>SELECT count() FROM system.numbers WHERE NOT ignore(randomPrintableASCII(10000))</query>
<query>SELECT count() FROM system.numbers WHERE NOT ignore(randomPrintableASCII(rand() % 10))</query>
<query>SELECT count() FROM system.numbers WHERE NOT ignore(randomPrintableASCII(rand() % 100))</query>
<query>SELECT count() FROM system.numbers WHERE NOT ignore(randomPrintableASCII(rand() % 1000))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(randomPrintableASCII(10))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(randomPrintableASCII(100))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(randomPrintableASCII(1000))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(randomPrintableASCII(10000))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(randomPrintableASCII(rand() % 10))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(randomPrintableASCII(rand() % 100))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(randomPrintableASCII(rand() % 1000))</query>
</test>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册