{"action":"opened","issue":{"url":"https://api.github.com/repos/SergioBenitez/Rocket/issues/461","repository_url":"https://api.github.com/repos/SergioBenitez/Rocket","labels_url":"https://api.github.com/repos/SergioBenitez/Rocket/issues/461/labels{/name}","comments_url":"https://api.github.com/repos/SergioBenitez/Rocket/issues/461/comments","events_url":"https://api.github.com/repos/SergioBenitez/Rocket/issues/461/events","html_url":"https://github.com/SergioBenitez/Rocket/issues/461","id":266042852,"number":461,"title":"Question about timing and fairings","user":{"login":"sindreij","id":210635,"avatar_url":"https://avatars1.githubusercontent.com/u/210635?v=4","gravatar_id":"","url":"https://api.github.com/users/sindreij","html_url":"https://github.com/sindreij","followers_url":"https://api.github.com/users/sindreij/followers","following_url":"https://api.github.com/users/sindreij/following{/other_user}","gists_url":"https://api.github.com/users/sindreij/gists{/gist_id}","starred_url":"https://api.github.com/users/sindreij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindreij/subscriptions","organizations_url":"https://api.github.com/users/sindreij/orgs","repos_url":"https://api.github.com/users/sindreij/repos","events_url":"https://api.github.com/users/sindreij/events{/privacy}","received_events_url":"https://api.github.com/users/sindreij/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-17T08:54:24Z","updated_at":"2017-10-17T08:54:24Z","closed_at":null,"author_association":"NONE","body":"Apologies if this has been addressed, but I could not find anything while searching. I want to be able to do timing of requests in my rocket application, but I could not find any information on best practises for doing that. I know that the fairing documentation says that it should be possible.\r\n\r\nTo do timing, I need to, as far as I know, be able to save a request start time in `on_request`, and then fetch that and calculate the ellapsed time in `on_response`. The only way I have found to do that, is by saving the start time to a header. And serializing a SystemTime as a string feels wrong.\r\n\r\nAnother concern is that on_response happens when the router has finished the response, but it has not been sent to the user yet. I would like to also time how long it takes to stream the response to the user.\r\n\r\nRocket version: 0.3.2"}}
{"actor":{"display_login":"sindreij"}}