-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a timestamp to the Rook request object.
Requests objects now have a `httpuv.timestamp` member containing a timestamp compatible with Sys.time(). This timestamp is captured when the request is received at the C++ level in the background thread, which has two advantages: 1. We can much more accurately capture the total time the client actually waits for the request to get processed. 2. We can instrument the time it takes before the R-level callback actually runs. More broadly, the timestamp makes it easier to log measures of request latency in httpuv-based applications, and reduces the overhead of common ways to do so -- e.g. using Plumber hooks. Signed-off-by: Aaron Jacobs <aaron.jacobs@crescendotechnology.com>
- Loading branch information
Showing
3 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters