-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate :{start,end}_time, add :timing instead
There are a few reasons for this change: 1. We use realtime to measure performance for the `:total` stat. This is no good, especially since we use monotonic time for other groups. It is inconsitent and confusing 2. New functionality requires a better API. Specifically, we want to be able to send timing of a certain job. To achieve that we wrap the job in a benchmark `measure` call. The problem is that our API doesn't make it easy to send already calculated timing. `start_time` makes the user code very clunky and confusing Before: ``` start_time = Time.now calculate_operation Airbrake.notify_request( ..., start_time: start_time, end_time: Time.now, ) ``` After: ``` timing = Airbrake::Benchmark.measure do calculate_operation end Airbrake.notify_request( ..., timing: timing, ) ```
- Loading branch information
Showing
9 changed files
with
150 additions
and
97 deletions.
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
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
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
Oops, something went wrong.