Print profile events in 02402_external_disk_mertrics

This commit is contained in:
vdimir 2023-04-21 10:51:42 +00:00
parent 40c774f387
commit 6a70bfcdb7
No known key found for this signature in database
GPG Key ID: 6EE4CE2BEDC51862
2 changed files with 39 additions and 27 deletions

View File

@ -1,3 +1,3 @@
1
1
1
ok
ok
ok

View File

@ -31,40 +31,52 @@ FORMAT Null;
SYSTEM FLUSH LOGS;
SELECT
any(ProfileEvents['ExternalProcessingFilesTotal']) >= 1 AND
any(ProfileEvents['ExternalProcessingCompressedBytesTotal']) >= 100000 AND
any(ProfileEvents['ExternalProcessingUncompressedBytesTotal']) >= 100000 AND
any(ProfileEvents['ExternalSortWritePart']) >= 1 AND
any(ProfileEvents['ExternalSortMerge']) >= 1 AND
any(ProfileEvents['ExternalSortCompressedBytes']) >= 100000 AND
any(ProfileEvents['ExternalSortUncompressedBytes']) >= 100000 AND
count() == 1
if(
any(ProfileEvents['ExternalProcessingFilesTotal']) >= 1 AND
any(ProfileEvents['ExternalProcessingCompressedBytesTotal']) >= 100000 AND
any(ProfileEvents['ExternalProcessingUncompressedBytesTotal']) >= 100000 AND
any(ProfileEvents['ExternalSortWritePart']) >= 1 AND
any(ProfileEvents['ExternalSortMerge']) >= 1 AND
any(ProfileEvents['ExternalSortCompressedBytes']) >= 100000 AND
any(ProfileEvents['ExternalSortUncompressedBytes']) >= 100000 AND
count() == 1,
'ok',
'fail: ' || toString(count()) || ' ' || toString(any(ProfileEvents))
)
FROM system.query_log WHERE current_database = currentDatabase()
AND log_comment = '02402_external_disk_mertrics/sort'
AND query ILIKE 'SELECT%2097152%' AND type = 'QueryFinish';
SELECT
any(ProfileEvents['ExternalProcessingFilesTotal']) >= 1 AND
any(ProfileEvents['ExternalProcessingCompressedBytesTotal']) >= 100000 AND
any(ProfileEvents['ExternalProcessingUncompressedBytesTotal']) >= 100000 AND
any(ProfileEvents['ExternalAggregationWritePart']) >= 1 AND
any(ProfileEvents['ExternalAggregationMerge']) >= 1 AND
any(ProfileEvents['ExternalAggregationCompressedBytes']) >= 100000 AND
any(ProfileEvents['ExternalAggregationUncompressedBytes']) >= 100000 AND
count() == 1
if(
any(ProfileEvents['ExternalProcessingFilesTotal']) >= 1 AND
any(ProfileEvents['ExternalProcessingCompressedBytesTotal']) >= 100000 AND
any(ProfileEvents['ExternalProcessingUncompressedBytesTotal']) >= 100000 AND
any(ProfileEvents['ExternalAggregationWritePart']) >= 1 AND
any(ProfileEvents['ExternalAggregationMerge']) >= 1 AND
any(ProfileEvents['ExternalAggregationCompressedBytes']) >= 100000 AND
any(ProfileEvents['ExternalAggregationUncompressedBytes']) >= 100000 AND
count() == 1,
'ok',
'fail: ' || toString(count()) || ' ' || toString(any(ProfileEvents))
)
FROM system.query_log WHERE current_database = currentDatabase()
AND log_comment = '02402_external_disk_mertrics/aggregation'
AND query ILIKE 'SELECT%2097152%' AND type = 'QueryFinish';
SELECT
any(ProfileEvents['ExternalProcessingFilesTotal']) >= 1 AND
any(ProfileEvents['ExternalProcessingCompressedBytesTotal']) >= 100000 AND
any(ProfileEvents['ExternalProcessingUncompressedBytesTotal']) >= 100000 AND
any(ProfileEvents['ExternalJoinWritePart']) >= 1 AND
any(ProfileEvents['ExternalJoinMerge']) >= 0 AND
any(ProfileEvents['ExternalJoinCompressedBytes']) >= 100000 AND
any(ProfileEvents['ExternalJoinUncompressedBytes']) >= 100000 AND
count() == 1
if(
any(ProfileEvents['ExternalProcessingFilesTotal']) >= 1 AND
any(ProfileEvents['ExternalProcessingCompressedBytesTotal']) >= 100000 AND
any(ProfileEvents['ExternalProcessingUncompressedBytesTotal']) >= 100000 AND
any(ProfileEvents['ExternalJoinWritePart']) >= 1 AND
any(ProfileEvents['ExternalJoinMerge']) >= 0 AND
any(ProfileEvents['ExternalJoinCompressedBytes']) >= 100000 AND
any(ProfileEvents['ExternalJoinUncompressedBytes']) >= 100000 AND
count() == 1,
'ok',
'fail: ' || toString(count()) || ' ' || toString(any(ProfileEvents))
)
FROM system.query_log WHERE current_database = currentDatabase()
AND log_comment = '02402_external_disk_mertrics/join'
AND query ILIKE 'SELECT%2097152%' AND type = 'QueryFinish';