### Description

We have a scheduler house keeping work (adopt_or_reset_orphaned_tasks, check_trigger_timeouts, _emit_pool_metrics, _find_zombies, clear_not_launched_queued_tasks and _check_worker_pods_pending_timeout) runs on certain frequency. Right now, we don't have any latency metrics on these house keeping work. These will impact the scheduler heartbeat. Its good idea to capture these latency metrics to identify and tune the airflow configuration

### Use case/motivation

As we run the airflow at a large scale, we have found that the adopt_or_reset_orphaned_tasks and clear_not_launched_queued_tasks functions might take time in a few minutes (> 5 minutes). These will delay the heartbeat of the scheduler and leads to the scheduler instance restarting/killed. In order to detect these latency issues, we need better metrics to capture these latencies.

### Related issues

_No response_

### Are you willing to submit a PR?

- [X] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

from airflow.cli.cli_config import (
        ARG_DAG_ID,
        ARG_EXECUTION_DATE,
        ARG_OUTPUT_PATH,
        ARG_SUBDIR,
        ARG_VERBOSE,
        ActionCommand,
        Arg,
        GroupCommand,
        lazy_load_command,
        positive_int,
    )
except ImportError:
    try:
        from airflow import __version__ as airflow_version
    except ImportError:
        from airflow.version import version as airflow_version
    import packaging.version
    from airflow.exceptions import AirflowOptionalProviderFeatureException
    base_version = packaging.version.parse(airflow_version).base_version
    if packaging.version.parse(base_version) < packaging.version.parse("2.7.0"):
        raise AirflowOptionalProviderFeatureException(
            "Kubernetes Executor from CNCF Provider should only be used with Airflow 2.7.0+.\n"
            f"This is Airflow {airflow_version} and Kubernetes and CeleryKubernetesExecutor are "
            f"available in the 'airflow.executors' package. You should not use "
            f"the provider's executors in this version of Airflow."
        )
    raise
from airflow.configuration import conf
from airflow.executors.base_executor import BaseExecutor