Sha256: eee18225fd741f1ab7dab43b49277f51ebe0d5f5c3365358d89c3ac2893f9a4e

Contents?: true

Size: 1.04 KB

Versions: 5

Compression:

Stored size: 1.04 KB

Contents

namespace :bench do

  def bench_cmd
    "bundle exec ruby -Ilib -I spec/integration/ spec/integration/bench_all.rb"
  end

  def alf_cmd(tail)
    "bundle exec alf --ff=%.6f --input-reader=rash #{tail}"
  end

  task :run do
    cmd = bench_cmd
    $stderr.puts cmd
    exec(cmd)
  end

  task :summary do
    cmd = bench_cmd
    cmd << " | "
    cmd << alf_cmd("summarize -- category -- min 'min{ total }' max 'max{ total }' avg 'avg{ total }' stddev 'stddev{ total }'")
    $stderr.puts cmd
    exec(cmd)
  end

  task :rank do
    cmd = bench_cmd
    cmd << " | "
    cmd << alf_cmd("summarize -- category alf -- parsing 'avg{ parsing }' compiling 'avg{ compiling }' translating 'avg{ translating }' printing 'avg{ printing }' total 'avg{ total }'")
    cmd << " | "
    cmd << alf_cmd("rank -- total desc -- position")
    cmd << " | "
    cmd << alf_cmd("project -- position category alf parsing compiling printing total")
    cmd << " | "
    cmd << alf_cmd("restrict -- 'position < 10'")
    $stderr.puts cmd
    exec(cmd)
  end

end
task :bench => :"bench:run"

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alf-sql-0.16.3 tasks/bench.rake
alf-sql-0.16.2 tasks/bench.rake
alf-sql-0.16.1 tasks/bench.rake
alf-sql-0.16.0 tasks/bench.rake
alf-sql-0.15.0 tasks/bench.rake