toptal/database_validations

View on GitHub
benchmarks/gc_suite.rb

Summary

Maintainability
A
0 mins
Test Coverage
# ===Setups===
# Enable and start GC before each job run. Disable GC afterwards.
class GCSuite
  def warming(*)
    run_gc
  end

  def running(*)
    run_gc
  end

  def warmup_stats(*); end

  def add_report(*); end

  private

  def run_gc
    GC.enable
    GC.start
    GC.disable
  end
end