Added a test for Memory Profiler

This commit is contained in:
Alexey Milovidov 2020-03-03 04:46:35 +03:00
parent f78f189bd8
commit cd4f7f26e8
2 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,2 @@
0
1

View File

@ -0,0 +1,6 @@
SET allow_introspection_functions = 1;
SET memory_profiler_step = 1000000;
SELECT ignore(groupArray(number), 'test memory profiler') FROM numbers(10000000);
SYSTEM FLUSH LOGS;
WITH addressToSymbol(arrayJoin(trace)) AS symbol SELECT count() > 0 FROM system.trace_log t WHERE event_date >= yesterday() AND trace_type = 'Memory' AND query_id = (SELECT query_id FROM system.query_log WHERE event_date >= yesterday() AND query LIKE '%test memory profiler%' ORDER BY event_time DESC LIMIT 1);