Add 'server-timing' headers to your node.js server.
If you're wondering why this would be useful, go check out this article.
There are other libraries out there that do this, but this one is the best. ;)
- Sub-millisecond accuracy with
process.hrtime(), but falls back to millisecond accuracy if you're on some weird platform that doesn't have
- No server-timing headers by default on prod.
- No dependencies on Express, but provides some handy middleware helpers if you're on Express.
See the api docs here.
;/* -- Use in express app -- */const app = ;app;// Time some middlewaresapp;app;app;app