aboutsummaryrefslogtreecommitdiff
path: root/bench.rb
blob: ea983b36a9eb8b9d9906101c8fcc982de7d93764 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env ruby

require 'benchmark'

Benchmark.bm(5) do |bm|
  bm.report('python') do 
    `python2.7 ./py-test.py test.csv out.csv`
  end

  bm.report('java') do
    `java -cp opencsv-2.3.jar:. JavaCSVTest test.csv out.csv`
  end

  bm.report('ruby') do
    `ruby ./rb-test.rb test.csv out.csv`
  end

  bm.report('crystal') do
    `./cr-test test.csv out.csv`
  end
end