Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Encapsulate time.Since in a defer function
* Fix how time.Since should be used with defer as described in golang/go#60048 * Previously time.Since(start) is evaluated immediately when the defer is defined which means the latency recorded is always 0 seconds. By moving the time.Since into a function, it does not get evaluated until the function is called which properly times the processing latency.
- Loading branch information