MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / adjustBufferSize

Method adjustBufferSize

src/IO/ReadSettings.cpp:40–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40ReadSettings ReadSettings::adjustBufferSize(size_t file_size) const
41{
42 ReadSettings res = *this;
43 res.local_fs_settings.buffer_size = std::min(std::max(1ul, file_size), local_fs_settings.buffer_size);
44 res.remote_fs_settings.buffer_size = std::min(std::max(1ul, file_size), remote_fs_settings.buffer_size);
45 /// Note, we do not touch `remote_fs_settings.large_buffer_size` since when
46 /// `filesystem_cache_settings.prefer_bigger_buffer_size` is set the buffer
47 /// may grow up to `large_buffer_size`, but it will not exceed total file size.
48 return res;
49}
50
51void ReadSettings::disableCaches()
52{

Callers 15

startMethod · 0.80
loadIndicesMethod · 0.80
StreamMethod · 0.80
loadMarksMethod · 0.80
initMethod · 0.80
loadMarksImplMethod · 0.80
readFileMethod · 0.80
readFileIfExistsMethod · 0.80
createReadBufferFunction · 0.80
PackedFilesReaderMethod · 0.80

Calls 2

minFunction · 0.50
maxFunction · 0.50

Tested by

no test coverage detected