M(Query,"Number of queries to be interpreted and potentially executed. Does not include queries that failed to parse or were rejected due to AST size limits, quota limits or limits on the number of simultaneously running queries. May include internal queries initiated by ClickHouse itself. Does not count subqueries.") \
M(ReadBufferFromFileDescriptorReadBytes,"Number of bytes read from file descriptors. If the file is compressed, this will show the compressed data size.") \
M(WriteBufferFromFileDescriptorWrite,"Number of writes (write/pwrite) to a file descriptor. Does not include sockets.") \
M(WriteBufferFromFileDescriptorWriteFailed,"Number of times the write (write/pwrite) to a file descriptor have failed.") \
M(WriteBufferFromFileDescriptorWriteBytes,"Number of bytes written to file descriptors. If the file is compressed, this will show compressed data size.") \
M(ReadCompressedBytes,"Number of bytes (the number of bytes before decompression) read from compressed sources (files, network).") \
M(CompressedReadBufferBlocks,"Number of compressed blocks (the blocks of data that are compressed independent of each other) read from compressed sources (files, network).") \
M(CompressedReadBufferBytes,"Number of uncompressed bytes (the number of bytes after decompression) read from compressed sources (files, network).") \
M(ReplicatedPartFetchesOfMerged,"Number of times we prefer to download already merged part from replica of ReplicatedMergeTree table instead of performing a merge ourself (usually we prefer doing a merge ourself to save network traffic). This happens when we have not all source parts to perform a merge or when the data part is old enough.") \
M(ReplicatedPartMutations,"") \
M(ReplicatedPartChecks,"") \
M(ReplicatedPartChecksFailed,"") \
M(ReplicatedDataLoss,"Number of times a data part that we wanted doesn't exist on any replica (even on replicas that are offline right now). That data parts are definitely lost. This is normal due to asynchronous replication (if quorum inserts were not enabled), when the replica on which the data part was written was failed and when it became online after fail it doesn't contain that data part.") \
\
M(InsertedRows,"Number of rows INSERTed to all tables.") \
M(InsertedBytes,"Number of bytes (uncompressed; for columns as they stored in memory) INSERTed to all tables.") \
M(DelayedInserts,"Number of times the INSERT of a block to a MergeTree table was throttled due to high number of active data parts for partition.") \
M(RejectedInserts,"Number of times the INSERT of a block to a MergeTree table was rejected with 'Too many parts' exception due to high number of active data parts for partition.") \
M(DelayedInsertsMilliseconds,"Total number of milliseconds spent while the INSERT of a block to a MergeTree table was throttled due to high number of active data parts for partition.") \
M(DuplicatedInsertedBlocks,"Number of times the INSERTed block to a ReplicatedMergeTree table was deduplicated.") \
M(ReplicaPartialShutdown,"How many times Replicated table has to deinitialize its state due to session expiration in ZooKeeper. The state is reinitialized every time when ZooKeeper is available again.") \
M(MergedRows,"Rows read for background merges. This is the number of rows before merge.") \
M(MergedUncompressedBytes,"Uncompressed bytes (for columns as they stored in memory) that was read for background merges. This is the number before merge.") \
M(MergesTimeMilliseconds,"Total time spent for background merges.")\
\
M(MergeTreeDataWriterRows,"Number of rows INSERTed to MergeTree tables.") \
M(MergeTreeDataWriterUncompressedBytes,"Uncompressed bytes (for columns as they stored in memory) INSERTed to MergeTree tables.") \
M(MergeTreeDataWriterCompressedBytes,"Bytes written to filesystem for data INSERTed to MergeTree tables.") \
M(MergeTreeDataWriterBlocks,"Number of blocks INSERTed to MergeTree tables. Each block forms a data part of level zero.") \
M(MergeTreeDataWriterBlocksAlreadySorted,"Number of blocks INSERTed to MergeTree tables that appeared to be already sorted.") \
\
M(CannotRemoveEphemeralNode,"Number of times an error happened while trying to remove ephemeral node. This is not an issue, because our implementation of ZooKeeper library guarantee that the session will expire and the node will be removed.") \
M(LeaderElectionAcquiredLeadership,"Number of times a ReplicatedMergeTree table became a leader. Leader replica is responsible for assigning merges, cleaning old blocks for deduplications and a few more bookkeeping tasks.") \
\
M(RegexpCreated,"Compiled regular expressions. Identical regular expressions compiled just once and cached forever.") \
M(ContextLock,"Number of times the lock of Context was acquired or tried to acquire. This is global lock.") \
M(RealTimeMicroseconds,"Total (wall clock) time spent in processing (queries and other tasks) threads (not that this is a sum).") \
M(UserTimeMicroseconds,"Total time spent in processing (queries and other tasks) threads executing CPU instructions in user space. This include time CPU pipeline was stalled due to cache misses, branch mispredictions, hyper-threading, etc.") \
M(SystemTimeMicroseconds,"Total time spent in processing (queries and other tasks) threads executing CPU instructions in OS kernel space. This include time CPU pipeline was stalled due to cache misses, branch mispredictions, hyper-threading, etc.") \
M(SoftPageFaults,"") \
M(HardPageFaults,"") \
M(VoluntaryContextSwitches,"") \
M(InvoluntaryContextSwitches,"") \
\
M(OSIOWaitMicroseconds,"Total time a thread spent waiting for a result of IO operation, from the OS point of view. This is real IO that doesn't include page cache.") \
M(OSCPUWaitMicroseconds,"Total time a thread was ready for execution but waiting to be scheduled by OS, from the OS point of view.") \
M(OSCPUVirtualTimeMicroseconds,"CPU time spent seen by OS. Does not include involuntary waits due to virtualization.") \
M(OSReadBytes,"Number of bytes read from disks or block devices. Doesn't include bytes read from page cache. May include excessive data due to block size, readahead, etc.") \
M(OSWriteBytes,"Number of bytes written to disks or block devices. Doesn't include bytes that are in page cache dirty pages. May not include data that was written by OS asynchronously.") \
M(OSReadChars,"Number of bytes read from filesystem, including page cache.") \
M(OSWriteChars,"Number of bytes written to filesystem, including page cache.") \
M(PerfCpuCycles,"Total cycles. Be wary of what happens during CPU frequency scaling.") \
M(PerfInstructions,"Retired instructions. Be careful, these can be affected by various issues, most notably hardware interrupt counts.") \
M(PerfCacheReferences,"Cache accesses. Usually this indicates Last Level Cache accesses but this may vary depending on your CPU. This may include prefetches and coherency messages; again this depends on the design of your CPU.") \
M(PerfCacheMisses,"Cache misses. Usually this indicates Last Level Cache misses; this is intended to be used in con‐junction with the PERFCOUNTHWCACHEREFERENCES event to calculate cache miss rates.") \
M(PerfBranchInstructions,"Retired branch instructions. Prior to Linux 2.6.35, this used the wrong event on AMD processors.") \
M(PerfTaskClock,"A clock count specific to the task that is running") \
M(PerfContextSwitches,"Number of context switches") \
M(PerfCpuMigrations,"Number of times the process has migrated to a new CPU") \
M(PerfAlignmentFaults,"Number of alignment faults. These happen when unaligned memory accesses happen; the kernel can handle these but it reduces performance. This happens only on some architectures (never on x86).") \
M(PerfEmulationFaults,"Number of emulation faults. The kernel sometimes traps on unimplemented instructions and emulates them for user space. This can negatively impact performance.") \
M(CannotWriteToWriteBufferDiscard,"Number of stack traces dropped by query profiler or signal handler because pipe is full or cannot write to pipe.") \
M(QueryProfilerSignalOverruns,"Number of times we drop processing of a signal due to overrun plus the number of signals that OS has not delivered due to overrun.") \