qoq-response-time

0.0.4 • Public • Published

Response Time

X-Response-Time middleware based on koa-response-time for qoq.

Installation

yarn add qoq-response-time

Usage

import { WebSlotManager } from 'qoq';
import { ResponseTime } from 'qoq-response-time';

export webSlots = WebSlotManager.use(new ResponseTime());

If you need response high resolution in nano time, set hrtime option to true:

new ResponseTime({ hrtime: true });

Sample of response header with hrtime=false (default):

X-Response-Time: 153ms

Sample of response header with hrtime=true:

X-Response-Time: 153.123581ms

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.41latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.41
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i qoq-response-time

Weekly Downloads

1

Version

0.0.4

License

MIT

Unpacked Size

3.84 kB

Total Files

8

Last publish

Collaborators

  • fwh1990