def sla_miss_pct(input_df1, input_df2):
    """Calculate SLA miss %

    Args:
        input_df1 (dataframe): dataframe consisting of filtered records as per duration and SLA misses grouped by DagId and TaskId
        input_df2 (dataframe): dataframe consisting of all the records as per duration and SLA misses grouped by DagId and TaskId

    Returns:
        String containing the SLA miss %
    """

    sla_pct = (np.nan_to_num(
        ((input_df1["size"].sum() * 100) / (input_df2["total_count"].sum())),
        0,
    ).round(2))
    return sla_pct
Calculate SLA miss %

    Args:
        input_df1 (dataframe): dataframe consisting of filtered records as per duration and SLA misses grouped by DagId and TaskId
        input_df2 (dataframe): dataframe consisting of all the records as per duration and SLA misses grouped by DagId and TaskId

    Returns:
        String containing the SLA miss %
    
sla-miss-report/airflow-sla-miss-report.py