v.25.3Improvement

Add ProfileEvents::QueryPreempted, which has a similar logic

Added ProfileEvents::QueryPreempted, which has a similar logic to CurrentMetrics::QueryPreempted. #77015 (VicoWu).
Introduced a new profiling event ProfileEvents::QueryPreempted that tracks the number of queries preempted, similar in function to the existing CurrentMetrics::QueryPreempted.

Why it matters

This feature provides enhanced visibility into query preemption by enabling the collection of profiling metrics. It helps users monitor and analyze query preemptions more effectively, facilitating performance tuning and resource management.

How to use it

Users can monitor the ProfileEvents::QueryPreempted counter via profiling tools and queries that expose ProfileEvents metrics. This event integrates seamlessly with existing profiling infrastructure without additional configuration.