Skip to content

Index

Log a message at program exit.

Source code in nava/platform/cli/logging/__init__.py
55
56
57
58
59
60
61
62
63
64
65
def exit_handler(logger: Logger) -> None:
    """Log a message at program exit."""
    t = time.monotonic() - _start_time
    ru = resource.getrusage(resource.RUSAGE_SELF)
    logger.info(
        "exit",
        real_s=t,
        user_s=ru.ru_utime,
        system_s=ru.ru_stime,
        peak_rss_kb=ru.ru_maxrss,
    )