Permalink
Browse files

+ extracted series generation

  • Loading branch information...
1 parent b3dd46f commit 1204d84d1ce49cc501edf9f47c292b8b0d19f178 @floere committed Sep 10, 2012
@@ -110,7 +110,7 @@ def each &block
symbols = []
gc_runs = []
- [queries[1, amount], queries[2, amount], queries[3, amount], queries[4, amount]].each do |queries|
+ Searches.series_for(amount).each do |queries|
queries.prepare
@@ -16,10 +16,6 @@
require_relative 'searches'
-queries = ->(complexity, amount) do
- Searches.new complexity, amount
-end
-
# You need to create the indexes first.
#
data.clear
@@ -31,7 +27,7 @@
# Run queries.
#
-[queries[1, amount], queries[2, amount], queries[3, amount], queries[4, amount]].each do |queries|
+Searches.series_for(amount).each do |queries|
queries.prepare
@@ -1,4 +1,8 @@
class Searches
+
+ def self.series_for amount
+ (1..4).map { |i| new i, amount }
+ end
def initialize complexity, amount
@complexity, @amount = complexity, amount

0 comments on commit 1204d84

Please sign in to comment.