v.23.2Improvement

Add metric for allocation times and bytes using mmap

Add a new metric to record allocations times and bytes using mmap. #46068 (李扬).
Added a new metric in ClickHouse to record allocation times and bytes specifically for mmap memory allocations.

Why it matters

This feature provides detailed tracking of mmap memory allocations, helping users monitor and analyze memory usage patterns related to mmap. It enhances observability and aids in diagnosing performance bottlenecks or memory issues tied to mmap operations.

How to use it

The new mmap allocation metrics are enabled by default and automatically collected within ClickHouse's existing monitoring system. Users can query these metrics through the system tables or metrics interfaces to gain insights without additional configuration.