{"repo":"yosuke-furukawa/server-timing","free":true,"listed":false,"github":"https://github.com/yosuke-furukawa/server-timing","clone":"git clone https://github.com/yosuke-furukawa/server-timing.git","description":"This module adds [Server-Timing](https://www.w3.org/TR/server-timing/) to response headers, see [example](https://server-timing.now.sh/) and open chrome dev tool","language":"JavaScript","stars":127,"topics":["nodejs","express","server-timing"],"license":null,"category":"dev-tools","readme_excerpt":"server-timing This module adds Server-Timing to HTTP response headers. An example is available here. To see the Server-Timing headers in action, open the network tab in your browser's developer tools when viewing the example. This module can be used as an Express middleware or with Node.js's basic HTTP module. Install Usage Conditionally enabled API constructor(options) - options.name : string, default 'total' . The name for the primary timing metric, often representing the total request processing time. - options.description : string, default 'Total Response Time' . A human-readable description for the primary timing metric. - options.total : boolean, default true . If true , automatically includes a metric for the total response time. - options.enabled : boolean function, default true . Controls whether Server-Timing headers are added. If a function is provided, it's called with request and response objects and must return a boolean to determine if headers should be sent for the current request. - options.autoEnd : boolean, default true . If true , endTime() is automatically called for any timers that were started with startTime() but not explicitly ended before the response finishes. - options.precision : number, default +Infinity . Specifies the number of decimal places to use for timing values in the Server-Timing header. Example Result The Server-Timing headers will appear in the browser's developer tools, typically in the Network tab when inspecting a response. Here's ","default_branch":null,"files":null,"tree":[],"storefront":"/r/yosuke-furukawa","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/yosuke-furukawa/server-timing/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}