https://github.com/apache/airflow/blob/main/airflow/cli/commands/task_command.py#L145
return
        if self.clear_number > 0:
            return
        if not finished_tis:
            return
        try:
            dag = self.get_dag()
            if not dag.timetable.periodic:
                
                return
            try:
                first_start_date = min(ti.start_date for ti in finished_tis if ti.start_date)
            except ValueError:  
                pass
            else:
                
                
                
                
                
                data_interval_end = dag.get_run_data_interval(self).end
                true_delay = first_start_date - data_interval_end
                if true_delay.total_seconds() > 0:
                    Stats.timing(
                        f"dagrun.{dag.dag_id}.first_task_scheduling_delay", true_delay, tags=self.stats_tags
                    )
                    Stats.timing("dagrun.first_task_scheduling_delay", true_delay, tags=self.stats_tags)
        except Exception:
            self.log.warning("Failed to record first_task_scheduling_delay metric:", exc_info=True)
    def _emit_duration_stats_for_finished_state(self):