sphinx/ext/duration.py
def on_build_finished(app: Sphinx, error: Exception) -> None:
    """Display duration ranking on current build."""
    domain = cast(DurationDomain, app.env.get_domain('duration'))
    durations = sorted(domain.reading_durations.items(), key=itemgetter(1), reverse=True)
    if not durations:
        return

    logger.info('')
    logger.info(__('====================== slowest reading durations ======================='))
    for docname, d in islice(durations, 5):
        logger.info('%d.%03d %s', d.seconds, d.microseconds / 1000, docname)
Display duration ranking on current build.
Display duration ranking on current build.
Display duration ranking on current build .
def on_build_finished(app: Sphinx, error: Exception) -> None:
    domain = cast(DurationDomain, app.env.get_domain('duration'))
    durations = sorted(domain.reading_durations.items(), key=itemgetter(1), reverse=True)
    if not durations:
        return
    logger.info('')
    logger.info(__('====================== slowest reading durations ======================='))
    for docname, d in islice(durations, 5):
        logger.info('%d.%03d %s', d.seconds, d.microseconds / 1000, docname)
def on_build_finished ( app : Sphinx , error : Exception ) -> None : domain = cast ( DurationDomain , app . env . get_domain ( 'duration' ) ) durations = sorted ( domain . reading_durations . items ( ) , key = itemgetter ( 1 ) , reverse = True ) if not durations : return logger . info ( '' ) logger . info ( __ ( '====================== slowest reading durations =======================' ) ) for docname , d in islice ( durations , 5 ) : logger . info ( '%d.%03d %s' , d . seconds , d . microseconds / 1000 , docname )
Display duration ranking on current build.
Display duration ranking on current build .
"""Display duration ranking on current build."""
app
Sphinx
error
Exception