Sha256: c6e534bd2b19a15ecf2c1e261ba826cf50768a4d259d586ce87e4d01779aa088

Contents?: true

Size: 1 KB

Versions: 5

Compression:

Stored size: 1 KB

Contents

namespace :bench do

  def bench_cmd
    "ALF_TEST_ENV=postgres bundle exec ruby -Ilib bench/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 }' 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-sequel-0.16.3 tasks/bench.rake
alf-sequel-0.16.2 tasks/bench.rake
alf-sequel-0.16.1 tasks/bench.rake
alf-sequel-0.16.0 tasks/bench.rake
alf-sequel-0.15.0 tasks/bench.rake