ClickHouse/tests/queries/0_stateless/02810_system_jemalloc_bins.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
803 B
MySQL
Raw Normal View History

2023-07-03 20:39:42 +00:00
WITH
(SELECT value IN ('ON', '1') FROM system.build_options WHERE name = 'USE_JEMALLOC') AS jemalloc_enabled,
(SELECT count() FROM system.jemalloc_bins) AS total_bins,
(SELECT count() FROM system.jemalloc_bins WHERE large) AS large_bins,
(SELECT count() FROM system.jemalloc_bins WHERE NOT large) AS small_bins,
2023-07-06 07:09:55 +00:00
(SELECT sum(size * (allocations - deallocations)) FROM system.jemalloc_bins WHERE large) AS large_allocated_bytes,
(SELECT sum(size * (allocations - deallocations)) FROM system.jemalloc_bins WHERE NOT large) AS small_allocated_bytes
2023-07-03 20:39:42 +00:00
SELECT
(total_bins > 0) = jemalloc_enabled,
(large_bins > 0) = jemalloc_enabled,
(small_bins > 0) = jemalloc_enabled,
(large_allocated_bytes > 0) = jemalloc_enabled,
(small_allocated_bytes > 0) = jemalloc_enabled;