aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/features/benchmark/rankingexpression/plot.rb
blob: 5cdef1fe0f8b1d5b5a00a31183a176aa4858c5b2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
require '../plotlib'

folder = ARGV[0]
extra = ""
extra = ARGV[1] if ARGV.size == 2
trees = [1, 5, 10, 50, 100, 200, 400, 800]

dat = folder + "/plot.dat"
png = folder + "/plot.png"

file = File.open(dat, "w")
trees.each do |t|
  file.write("#{t} ")
  file.write(extract_data(folder + "/c-#{t}.out") + " ")
  file.write("\n")
end
file.close

titles = ["expression"]

plot_graph(dat, titles, png, "rankingExpression feature (#{extra})", "number of trees", "execution time per document (ms)", folder)