mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
fix and performance test template
This commit is contained in:
parent
d459f07eee
commit
c3873495c9
@ -73,9 +73,9 @@ public:
|
||||
data_to.resize(next_offset);
|
||||
offsets_to[row_num] = next_offset;
|
||||
|
||||
auto * data_to_ptr = data_to.data(); // avoid assert on array indexing after end
|
||||
auto data_to_ptr = reinterpret_cast<UInt64 *>(data_to.data()); // avoid assert on array indexing after end
|
||||
for (size_t pos = offset, end = offset + length; pos < end;
|
||||
pos += 8) // We have padding in column buffers that we can overwrite.
|
||||
pos += sizeof(UInt64)) // We have padding in column buffers that we can overwrite.
|
||||
{
|
||||
UInt64 rand = thread_local_rng();
|
||||
data_to_ptr[pos] = rand;
|
||||
|
12
tests/performance/random_string.xml
Normal file
12
tests/performance/random_string.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<test>
|
||||
|
||||
|
||||
|
||||
<query>SELECT count() FROM zeros(1000000) WHERE NOT ignore(randomString(10))</query>
|
||||
<query>SELECT count() FROM zeros(1000000) WHERE NOT ignore(randomString(100))</query>
|
||||
<query>SELECT count() FROM zeros(100000) WHERE NOT ignore(randomString(1000))</query>
|
||||
<query>SELECT count() FROM zeros(10000) WHERE NOT ignore(randomString(10000))</query>
|
||||
<query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(randomString(rand() % 10))</query>
|
||||
<query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(randomString(rand() % 100))</query>
|
||||
<query>SELECT count() FROM zeros(1000000) WHERE NOT ignore(randomString(rand() % 1000))</query>
|
||||
</test>
|
Loading…
Reference in New Issue
Block a user