mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 20:02:05 +00:00
Add extensive test for various read settings
The following settings had been covered: - min_bytes_to_use_direct_io - local_filesystem_read_method - local_filesystem_read_prefetch - read_priority - max_read_buffer_size
This commit is contained in:
parent
fb54d6b6e0
commit
14baed927f
11
tests/queries/0_stateless/02051_read_settings.reference.j2
Normal file
11
tests/queries/0_stateless/02051_read_settings.reference.j2
Normal file
@ -0,0 +1,11 @@
|
||||
{% for read_method in ['read', 'mmap', 'pread_threadpool', 'pread_fake_async'] -%}
|
||||
{% for direct_io in [0, 1] -%}
|
||||
{% for prefetch in [0, 1] -%}
|
||||
{% for priority in [0, 1] -%}
|
||||
{% for buffer_size in [65505, 1048576] -%}
|
||||
1000000
|
||||
{% endfor -%}
|
||||
{% endfor -%}
|
||||
{% endfor -%}
|
||||
{% endfor -%}
|
||||
{% endfor -%}
|
31
tests/queries/0_stateless/02051_read_settings.sql.j2
Normal file
31
tests/queries/0_stateless/02051_read_settings.sql.j2
Normal file
@ -0,0 +1,31 @@
|
||||
-- Tags: long
|
||||
--
|
||||
-- Test for testing various read settings.
|
||||
|
||||
drop table if exists data_02051;
|
||||
|
||||
create table data_02051 (key Int, value String) engine=MergeTree() order by key
|
||||
as select number, repeat(toString(number), 5) from numbers(1e6);
|
||||
|
||||
{# check each local_filesystem_read_method #}
|
||||
{% for read_method in ['read', 'mmap', 'pread_threadpool', 'pread_fake_async'] %}
|
||||
{# check w/ O_DIRECT and w/o (min_bytes_to_use_direct_io) #}
|
||||
{% for direct_io in [0, 1] %}
|
||||
{# check local_filesystem_read_prefetch (just a smoke test) #}
|
||||
{% for prefetch in [0, 1] %}
|
||||
{# check read_priority (just a smoke test) #}
|
||||
{% for priority in [0, 1] %}
|
||||
{# check alignment for O_DIRECT with various max_read_buffer_size #}
|
||||
{% for buffer_size in [65505, 1048576] %}
|
||||
select count(ignore(*)) from data_02051 settings
|
||||
min_bytes_to_use_direct_io={{ direct_io }},
|
||||
local_filesystem_read_method='{{ read_method }}',
|
||||
local_filesystem_read_prefetch={{ prefetch }},
|
||||
read_priority={{ priority }},
|
||||
max_read_buffer_size={{ buffer_size }}
|
||||
;
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
Loading…
Reference in New Issue
Block a user