test/test_ring_cache_performance.rb
# Computer-dependant -- but should be a reasonable baseline
Computer-dependant -- but should be a reasonable baseline
Computer - dependant -- but should be a reasonable baseline
def bench_performance
    if ENV['BENCH']
      validation = lambda { |ranges, times|
        count_per_second = ranges.last / times.last.to_f
        assert count_per_second > 100_000, 'Count per second: %.2f' % count_per_second
      }
      assert_performance validation do |n|
        run_cache(n)
      end
    end
  end
def bench_performance if ENV [ 'BENCH' ] validation = lambda { | ranges , times | count_per_second = ranges . last / times . last . to_f assert count_per_second > 100_000 , 'Count per second: %.2f' % count_per_second } assert_performance validation do | n | run_cache ( n ) end end end
Computer-dependant -- but should be a reasonable baseline
Computer - dependant -- but should be a reasonable baseline