Issue #10634 has been updated by 11 22.


http://www.software-rating.com/
http://www.smartlogi.com/ 
http://www.shareorder.com/  
http://www.gzs168.com/ 
http://www.aimooimage.com/    
http://www.chinatowngate.net/

http://www.inspiredhypnosis.co.uk/daocplat.html
http://the303plan.com/tibiagoldforsale.html

----------------------------------------
Feature #10634: Baselining with Benchmark
https://bugs.ruby-lang.org/issues/10634#change-53328

* Author: Robert Klemme
* Status: Open
* Priority: Normal
* Assignee: 
----------------------------------------
Add a method Benchmark::Report#baseline.  This does not report measurementsbut 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:

1. If baseline is nil, report as today.
1. 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:

~~~
Benchmark.bm do |x|
  x.baseline do
    REP.times {}
  end

  x.report "m" do
    REP.times { f() }
  end
end
~~~

Output could be something like this:

~~~
       user     system      total        real
m  0.220000   0.000000   0.220000 (  0.221528)
~~~

Note the absence of any output for the baseline invocation.

Notes:

1. Return values of #report, #bm and #bmbm are not changed, i.e. they stillcontain the raw measurement (i.e. without subtracting the baseline).
1. We probably want to add another method #clear_baseline to set the baseline value back to nil.
1. A reasonable variant would be to add a second line to the output presenting measurement minus baseline like this:

~~~
       user     system      total        real
m  0.220000   0.000000   0.220000 (  0.221528) measured
m  0.120000   0.000000   0.120000 (  0.121497) normalized
~~~




-- 
https://bugs.ruby-lang.org/