sopel39 opened a new issue, #27872: URL: https://github.com/apache/datafusion/issues/27872
### Is your feature request related to a problem or challenge? `elapsed_compute` records wall-clock time between a timer's start and stop. On a host with more busy threads than cores (several queries at once, or one DataFusion task per thread on an oversubscribed executor), much of a timed section can be time the thread waited to be scheduled. The metric then charges that wait to whichever operator happened to be descheduled, so `EXPLAIN ANALYZE` and per-operator profiles are misleading exactly when the system is busy. ### Describe the solution you'd like An opt-in `datafusion.execution.cpu_time_metrics` option under which `elapsed_compute` reads the thread's CPU clock (`CLOCK_THREAD_CPUTIME_ID` on Unix) at a timer's start and stop instead of the monotonic clock, so the metric measures the work an operator did. Off by default, since reading a thread's CPU clock is a system call and costs more than reading the monotonic clock. ### Describe alternatives you've considered A process-wide switch, which would not let sessions with different needs share a process. ### Additional context _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
