server-timing-benchmark
Benchmark server-side using Server Timing API
Installation
This package is available on npmjs.org
. You can intall via npm
command:
$ npm install server-timing-benchmark
Usage
This package supports http/https
module and express
.
http
const http = ;const serverTimingBenchmark = ; http;
Above server will respond with header:
Server-Timing: someFunction; dur=[ms]
with body of 'response'.
express
const express = ;const serverTimingBenchmark = ; const app = ;app;app;app;
Above server will respond with header:
Server-Timing: promiseFunction; dur=1000
with body of 'response'.
License
MIT
Author
Yoshiaki Sugimoto