mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
do not test upper bounds for throttlers
This commit is contained in:
parent
985b2a010a
commit
fb8502ba76
@ -117,7 +117,8 @@ def assert_took(took, should_took):
|
||||
# we need to decrease the lower limit because the server limits could
|
||||
# be enforced by throttling some server background IO instead of query IO
|
||||
# and we have no control over it
|
||||
assert took >= should_took[0] * 0.85 and took < should_took[1]
|
||||
# Note that throttler does not apply any restrictions on upper bound, so we can only tell how much time required "at least", not "at most"
|
||||
assert took >= should_took * 0.85
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@ -132,7 +133,7 @@ def assert_took(took, should_took):
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
(0, 3),
|
||||
0,
|
||||
id="no_local_throttling",
|
||||
),
|
||||
# reading 1e6*8 bytes with 1M default bandwith should take (8-1)/1=7 seconds
|
||||
@ -142,7 +143,7 @@ def assert_took(took, should_took):
|
||||
"user",
|
||||
"max_backup_bandwidth",
|
||||
"1M",
|
||||
(7, 14),
|
||||
7,
|
||||
id="user_local_throttling",
|
||||
),
|
||||
# reading 1e6*8 bytes with 2M default bandwith should take (8-2)/2=3 seconds
|
||||
@ -152,7 +153,7 @@ def assert_took(took, should_took):
|
||||
"server",
|
||||
"max_backup_bandwidth_for_server",
|
||||
"2M",
|
||||
(3, 7),
|
||||
3,
|
||||
id="server_local_throttling",
|
||||
),
|
||||
#
|
||||
@ -164,7 +165,7 @@ def assert_took(took, should_took):
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
(0, 3),
|
||||
0,
|
||||
id="no_remote_to_local_throttling",
|
||||
),
|
||||
# reading 1e6*8 bytes with 1M default bandwith should take (8-1)/1=7 seconds
|
||||
@ -184,7 +185,7 @@ def assert_took(took, should_took):
|
||||
"server",
|
||||
"max_backup_bandwidth_for_server",
|
||||
"2M",
|
||||
(3, 7),
|
||||
3,
|
||||
id="server_remote_to_local_throttling",
|
||||
),
|
||||
#
|
||||
@ -196,7 +197,7 @@ def assert_took(took, should_took):
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
(0, 3),
|
||||
0,
|
||||
id="no_remote_to_remote_throttling",
|
||||
),
|
||||
# No throttling for S3-to-S3, uses native copy
|
||||
@ -206,7 +207,7 @@ def assert_took(took, should_took):
|
||||
"user",
|
||||
"max_backup_bandwidth",
|
||||
"1M",
|
||||
(0, 3),
|
||||
0,
|
||||
id="user_remote_to_remote_throttling",
|
||||
),
|
||||
# No throttling for S3-to-S3, uses native copy
|
||||
@ -216,7 +217,7 @@ def assert_took(took, should_took):
|
||||
"server",
|
||||
"max_backup_bandwidth_for_server",
|
||||
"2M",
|
||||
(0, 3),
|
||||
0,
|
||||
id="server_remote_to_remote_throttling",
|
||||
),
|
||||
#
|
||||
@ -233,7 +234,7 @@ def assert_took(took, should_took):
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
(0, 3),
|
||||
0,
|
||||
id="no_local_to_remote_throttling",
|
||||
),
|
||||
# reading 1e6*8 bytes with 1M default bandwith should take (8-1)/1=7 seconds, but for S3Client it is 2x more
|
||||
@ -243,7 +244,7 @@ def assert_took(took, should_took):
|
||||
"user",
|
||||
"max_backup_bandwidth",
|
||||
"1M",
|
||||
(7 * 3, 7 * 4 - 1),
|
||||
7 * 3,
|
||||
id="user_local_to_remote_throttling",
|
||||
),
|
||||
# reading 1e6*8 bytes with 2M default bandwith should take (8-2)/2=3 seconds, but for S3Client it is 2x more
|
||||
@ -253,7 +254,7 @@ def assert_took(took, should_took):
|
||||
"server",
|
||||
"max_backup_bandwidth_for_server",
|
||||
"2M",
|
||||
(3 * 3, 3 * 5),
|
||||
3 * 3,
|
||||
id="server_local_to_remote_throttling",
|
||||
),
|
||||
],
|
||||
@ -306,7 +307,7 @@ def test_backup_throttling_override():
|
||||
"user",
|
||||
"max_local_read_bandwidth",
|
||||
"1M",
|
||||
(7, 14),
|
||||
7,
|
||||
id="user_local_throttling",
|
||||
),
|
||||
# reading 1e6*8 bytes with 2M default bandwith should take (8-2)/2=3 seconds
|
||||
@ -315,7 +316,7 @@ def test_backup_throttling_override():
|
||||
"server",
|
||||
"max_local_read_bandwidth_for_server",
|
||||
"2M",
|
||||
(3, 7),
|
||||
3,
|
||||
id="server_local_throttling",
|
||||
),
|
||||
#
|
||||
@ -328,7 +329,7 @@ def test_backup_throttling_override():
|
||||
"user",
|
||||
"max_remote_read_network_bandwidth",
|
||||
"1M",
|
||||
(7, 14),
|
||||
7,
|
||||
id="user_remote_throttling",
|
||||
),
|
||||
# reading 1e6*8 bytes with 2M default bandwith should take (8-2)/2=3 seconds
|
||||
@ -337,7 +338,7 @@ def test_backup_throttling_override():
|
||||
"server",
|
||||
"max_remote_read_network_bandwidth_for_server",
|
||||
"2M",
|
||||
(3, 7),
|
||||
3,
|
||||
id="server_remote_throttling",
|
||||
),
|
||||
],
|
||||
@ -368,7 +369,7 @@ def test_read_throttling(policy, mode, setting, value, should_took):
|
||||
"user",
|
||||
"max_local_write_bandwidth",
|
||||
"1M",
|
||||
(7, 14),
|
||||
7,
|
||||
id="local_user_throttling",
|
||||
),
|
||||
# reading 1e6*8 bytes with 2M default bandwith should take (8-2)/2=3 seconds
|
||||
@ -377,29 +378,29 @@ def test_read_throttling(policy, mode, setting, value, should_took):
|
||||
"server",
|
||||
"max_local_write_bandwidth_for_server",
|
||||
"2M",
|
||||
(3, 7),
|
||||
3,
|
||||
id="local_server_throttling",
|
||||
),
|
||||
#
|
||||
# Remote
|
||||
#
|
||||
pytest.param("s3", None, None, None, (0, 3), id="no_remote_throttling"),
|
||||
# writeing 1e6*8 bytes with 1M default bandwith should take (8-1)/1=7 seconds
|
||||
# writing 1e6*8 bytes with 1M default bandwith should take (8-1)/1=7 seconds
|
||||
pytest.param(
|
||||
"s3",
|
||||
"user",
|
||||
"max_remote_write_network_bandwidth",
|
||||
"1M",
|
||||
(7, 14),
|
||||
7,
|
||||
id="user_remote_throttling",
|
||||
),
|
||||
# writeing 1e6*8 bytes with 2M default bandwith should take (8-2)/2=3 seconds
|
||||
# writing 1e6*8 bytes with 2M default bandwith should take (8-2)/2=3 seconds
|
||||
pytest.param(
|
||||
"s3",
|
||||
"server",
|
||||
"max_remote_write_network_bandwidth_for_server",
|
||||
"2M",
|
||||
(3, 7),
|
||||
3,
|
||||
id="server_remote_throttling",
|
||||
),
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user