INNER CODE UNIT · Python

duration_ms

shenmintao/marginalia · src/marginalia/main.py:272

        duration_ms = int((time.perf_counter() - started) * 1000)
        log.exception(
            "request %s failed method=%s path=%s client=%s duration_ms=%d",
            request_id,
            request.method,
            request.url.path,
            _client_host(request),
            duration_ms,
        )
        raise
    duration_ms = int((time.perf_counter() - started) * 1000)
    response.headers["X-Request-Id"] = request_id
    path = request.url.path
    if path not in PUBLIC_PROBE_PATHS and response.status_code >= 500:
        log.error(
            "request %s returned %d method=%s path=%s client=%s duration_ms=%d",
            request_id,
            response.status_code,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…