class RSpec::Core::Example
Extensions to RSpec::Core::Example
to perform explicit GC and capture GC execution time.
Private Instance Methods
record_finished(status, results={})
click to toggle source
# File lib/rspec-gc-control/example.rb, line 11 def record_finished(status, results={}) finished_at = Time.now record results.merge(:status => status, :finished_at => finished_at, :run_time => (finished_at - (execution_result[:started_at] + (execution_result[:gc_time] || 0)))) end
run_after_each()
click to toggle source
# File lib/rspec-gc-control/example.rb, line 18 def run_after_each run_after_each_without_gc ensure execution_result[:gc_time] = RSpec.configuration.gc_if_needed end
Also aliased as: run_after_each_without_gc