lib/benchmark.rb in rkneufeld-fuzzy-realty-0.7.0 vs lib/benchmark.rb in rkneufeld-fuzzy-realty-0.7.1

- old
+ new

@@ -1,7 +1,7 @@ require 'fuzzy_realty.rb' - +if __FILE__ == $0 puts "Benchmarking search through 100,000-1 (powers of ten) random listings" puts "=======================================================================" listings = [] 100_000.times { listings << FuzzyRealty::Listing.random } puts "Generated #{listings.count} random listings" @@ -15,6 +15,7 @@ x.report("100 listings:") { FuzzyRealty::ExpertSystem.scores(listings,Query.random) } listings = listings[(0...10)] x.report("10 listings:") { FuzzyRealty::ExpertSystem.scores(listings,Query.random) } listings = listings[(0...1)] x.report("1 listing:") { FuzzyRealty::ExpertSystem.scores(listings,Query.random) } +end end