Actions
Feature #10634
openBaselining with Benchmark
Feature #10634:
Baselining with Benchmark
Status:
Open
Assignee:
-
Target version:
-
Description
Add a method Benchmark::Report#baseline. This does not report measurements but stores them as a baseline value in the Benchmark::Report instance. This baseline is nil initially. Any invocation of Benchmark::Report#report will do one of two things:
- If baseline is nil, report as today.
- If baseline is set, report the difference of the current measurement (Benchmark::Tms) - the baseline value.
We use this to subtract effort for a baseline to get at the net effort. This is how code might look like:
Output could be something like this:
Note the absence of any output for the baseline invocation.
Notes:
- Return values of #report, #bm and #bmbm are not changed, i.e. they still contain the raw measurement (i.e. without subtracting the baseline).
- We probably want to add another method #clear_baseline to set the baseline value back to nil.
- A reasonable variant would be to add a second line to the output presenting measurement minus baseline like this:
Updated by hsbt (Hiroshi SHIBATA) almost 5 years ago
- Project changed from 14 to Ruby
Actions