Skip to content

Commit

Permalink
responeTime to use request.responded. drop tailTime. (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmstephens authored and arb committed Dec 30, 2017
1 parent 9ec13aa commit ce6cc96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions API.md
Expand Up @@ -181,8 +181,7 @@ Event object associated with the response event option into Good.
- `method` - method used by the request. Maps to `request.method`.
- `path` - incoming path requested. Maps to `request.path`.
- `query` - query object used by request. Maps to `request.query`.
- `responseTime` - calculated value of `Date.now() - request.info.received`.
- `responseSentTime` - calculated value of `request.info.responded - request.info.received`.
- `responseTime` - calculated value of `request.info.responded - request.info.received`.
- `statusCode` - the status code of the response.
- `pid` - the current process id.
- `httpVersion` - the http protocol information from the request.
Expand Down
3 changes: 1 addition & 2 deletions lib/utils.js
Expand Up @@ -69,8 +69,7 @@ class RequestSent {
this.method = request.method;
this.path = request.path;
this.query = request.query;
this.responseTime = Date.now() - request.info.received;
this.responseSentTime = request.info.responded - request.info.received;
this.responseTime = request.info.responded - request.info.received;
this.statusCode = res.statusCode;
this.pid = process.pid;
this.httpVersion = request.raw.req.httpVersion;
Expand Down

0 comments on commit ce6cc96

Please sign in to comment.