Sha256: bc623d3e3fca412568441c3a41404fa9348b3d461e39bcb33e0bd7dbe738e672

Contents?: true

Size: 1019 Bytes

Versions: 26

Compression:

Stored size: 1019 Bytes

Contents

require 'benchmark'
require 'stringio'

require 'kramdown'
require 'bluecloth'
require 'maruku'
require 'maruku/version'
require 'rdiscount'
require 'bluefeather'

module MaRuKu::Errors
  def tell_user(s)
  end
end


RUNS=20

FILES=['mdsyntax.text', 'mdbasics.text']

puts "Running tests on #{Time.now.strftime("%Y-%m-%d")} under #{RUBY_DESCRIPTION}"

FILES.each do |file|
  data = File.read(File.join(File.dirname(__FILE__), file))
  puts
  puts "Test using file #{file} and #{RUNS} runs"
  Benchmark.bmbm do |b|
    b.report("kramdown #{Kramdown::VERSION}") { RUNS.times { Kramdown::Document.new(data).to_html } }
    b.report("Maruku #{MaRuKu::Version}") { RUNS.times { Maruku.new(data, :on_error => :ignore).to_html } }
    b.report("BlueFeather #{BlueFeather::VERSION}") { RUNS.times { BlueFeather.parse(data) } }
    b.report("BlueCloth #{BlueCloth::VERSION}") { RUNS.times { BlueCloth.new(data).to_html } }
    b.report("RDiscount #{RDiscount::VERSION}") { RUNS.times { RDiscount.new(data).to_html } }
  end
end

Version data entries

26 entries across 26 versions & 5 rubygems

Version Path
kramdown-0.14.1 benchmark/benchmark.rb
kramdown-0.14.0 benchmark/benchmark.rb
kramdown-0.13.8 benchmark/benchmark.rb
kramdown-0.13.7 benchmark/benchmark.rb
kramdown-0.13.6 benchmark/benchmark.rb
kramdown-0.13.5 benchmark/benchmark.rb
gitdown-0.0.2 benchmark/benchmark.rb
gitdown-0.0.1 benchmark/benchmark.rb
kramdown-0.13.4 benchmark/benchmark.rb
vanity-1.7.1 vendor/ruby/1.9.1/gems/kramdown-0.13.3/benchmark/benchmark.rb
radiant-1.0.0.rc2 vendor/extensions/markdown_filter/vendor/kramdown/benchmark/benchmark.rb
radiant-1.0.0.rc1 vendor/extensions/markdown_filter/vendor/kramdown/benchmark/benchmark.rb
kramdown-0.13.3 benchmark/benchmark.rb
kramdown-0.13.2 benchmark/benchmark.rb
kramdown-0.13.1 benchmark/benchmark.rb
radiantcms-couchrest_model-0.1.4 vendor/extensions/markdown_filter/vendor/kramdown/benchmark/benchmark.rb
kramdown-0.12.0 benchmark/benchmark.rb
kramdown-0.11.0 benchmark/benchmark.rb
kramdown-0.10.0 benchmark/benchmark.rb
radiant-0.9.1 vendor/extensions/markdown_filter/vendor/kramdown/benchmark/benchmark.rb