summaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/features/benchmark/fieldmatch/run.rb
diff options
context:
space:
mode:
Diffstat (limited to 'searchlib/src/tests/features/benchmark/fieldmatch/run.rb')
-rw-r--r--searchlib/src/tests/features/benchmark/fieldmatch/run.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/searchlib/src/tests/features/benchmark/fieldmatch/run.rb b/searchlib/src/tests/features/benchmark/fieldmatch/run.rb
new file mode 100644
index 00000000000..d0350c454e8
--- /dev/null
+++ b/searchlib/src/tests/features/benchmark/fieldmatch/run.rb
@@ -0,0 +1,17 @@
+# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+if ARGV.size == 0
+ puts "must specify folder"
+ exit
+end
+
+folder = ARGV[0]
+cases = [20, 100, 1000, 10000]
+segmentations = [1, 5, 10, 50, 100, 500, 1000, 10000]
+cases.each do |c|
+ segmentations.each do |s|
+ file = "c-#{c}-#{s}"
+ cmd = "script -c \"../../featurebenchmark -c #{file}.txt\" " + folder + "/#{file}.out"
+ puts cmd
+ `#{cmd}`
+ end
+end