src/dirbs/reports/stats_generator.py
def _calc_record_count(db_config, month, year, operator=None):
    """Calculates the number of records being used during report generation. Useful for normalizing per metrics."""
    with utils.create_db_connection(db_config) as conn, conn.cursor() as cursor, utils.CodeProfiler() as cp:
        network_triplets_partition = _monthly_network_triplets_partition(conn=conn, operator=operator,
                                                                         month=month, year=year)
        cursor.execute(sql.SQL("""SELECT COUNT(*) FROM {0}""").format(network_triplets_partition))
        record_count = cursor.fetchone()[0]
    return record_count, cp.duration, [cp.duration]
Calculates the number of records being used during report generation. Useful for normalizing per metrics.
Calculates the number of records being used during report generation. Useful for normalizing per metrics.
Calculates the number of records being used during report generation . Useful for normalizing per metrics .
def _calc_record_count(db_config, month, year, operator=None):
    with utils.create_db_connection(db_config) as conn, conn.cursor() as cursor, utils.CodeProfiler() as cp:
        network_triplets_partition = _monthly_network_triplets_partition(conn=conn, operator=operator,
                                                                         month=month, year=year)
        cursor.execute(sql.SQL("""SELECT COUNT(*) FROM {0}""").format(network_triplets_partition))
        record_count = cursor.fetchone()[0]
    return record_count, cp.duration, [cp.duration]
def _calc_record_count ( db_config , month , year , operator = None ) : with utils . create_db_connection ( db_config ) as conn , conn . cursor ( ) as cursor , utils . CodeProfiler ( ) as cp : network_triplets_partition = _monthly_network_triplets_partition ( conn = conn , operator = operator , month = month , year = year ) cursor . execute ( sql . SQL ( """SELECT COUNT(*) FROM {0}""" ) . format ( network_triplets_partition ) ) record_count = cursor . fetchone ( ) [ 0 ] return record_count , cp . duration , [ cp . duration ]
Calculates the number of records being used during report generation.
Calculates the number of records being used during report generation .
"""Calculates the number of records being used during report generation. Useful for normalizing per metrics."""
db_config
month
year
operator