http-performance
I use httpstat
to test my rest api's performance and then I want to write a module to get the performance of http
.
The moudle can get the request and response of http
, including dns
, method
, url
and so on.
API
// please require the module firstconst httpPerf = ;const http = ;httpPerf;http;
// please require the module firstconst httpPerf = ;const http = ;const express = ;httpPerf;const app = ;app;app; const server = app;const url = `http://127.0.0.1:`;http;
disable/enable
- type The http type, 'request' or 'response'
Diable or enable the http stats type, default is enabled.
const httpPerf = ;httpPerf;httpPerf;
License
MIT