Skip to content

Commit

Permalink
Add responseStartTime timing
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Aug 28, 2016
1 parent 9e17ba4 commit 33aa744
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions request.js
Expand Up @@ -958,6 +958,10 @@ Request.prototype.onRequestResponse = function (response) {
})

responseContent.on('data', function (chunk) {
if (self.timing && !self.responseStarted) {
self.responseStartTime = (new Date()).getTime()
response.responseStartTime = self.responseStartTime
}
self._destdata = true
self.emit('data', chunk)
})
Expand Down

0 comments on commit 33aa744

Please sign in to comment.