perf: optimize metric processing (#6669) - Replace stream-based processing with direct iteration in TimeBucketedMetrics to reduce allocations and GC pressure - Eliminate intermediate list creation in extractAllMetrics by processing metrics recursively in-place - Convert stream().anyMatch() to for-loop in isSupportedCategory for better performance |