Skip to main content

Server Timing interaction for aiohttp

Project description

aioservertiming

The Server-Timing header communicates one or more metrics and descriptions for a given request-response cycle. It is used to surface any backend server timing metrics (e.g. database read/write, CPU time, file system access, etc.) in the developer tools in the user's browser or in the PerformanceServerTiming interface. aioservertiming provides conventient functions to work with it from aiohttp.

Installation

Installation process as simple as:

$ pip install aioservertiming

Usage

First we need to set a middleware to app.

from aiohttp import web
from aioservertiming import server_timing_mware

app = web.Applicalion(
    middlewares = [
        server_timing_mware
    ])

Decorator


Context manager


Links

MDN documentation for Server-Timing

This library on PyPI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for aioservertiming, version 0.0.1a1
Filename, size File type Python version Upload date Hashes
Filename, size aioservertiming-0.0.1a1-py3-none-any.whl (12.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size aioservertiming-0.0.1a1.tar.gz (2.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page