SPARK-3179. Add task OutputMetrics.