Sha256: 80b269ba06e3b35ba1388a2450da16a4bed2f676743ea50fc72e19ed042a9e89

Contents?: true

Size: 849 Bytes

Versions: 6

Compression:

Stored size: 849 Bytes

Contents

require File.expand_path('../../lib/bibtex.rb', __FILE__)

require 'rubygems'
require 'bundler/setup'

require 'ruby-prof'

data = <<-END
@book{pickaxe,
	Address = {Raleigh, North Carolina},
	Author = "Thomas, Dave, and Fowler, Chad, and Hunt, Andy",
	Date-Added = {2010-08-05 09:54:07 +0200},
	Date-Modified = {2010-08-05 10:07:01 +0200},
	Keywords = {ruby},
	Publisher = {The Pragmatic Bookshelf},
	Series = {The Facets of Ruby},
	Title = {Programming Ruby 1.9: The Pragmatic Programmer's Guide},
	Year = {2009}
}
END

# data = data * 50
data = File.open(File.expand_path('../fixtures/benchmark.bib', __FILE__)).read

result = RubyProf.profile do
  BibTeX.parse(data)
  # BibTeX::Lexer.new.analyse(data)
end

printer = RubyProf::DotPrinter.new(result)
printer.print(File.open(File.expand_path('../profile.dot', __FILE__), 'w'), :min_percent => 5)

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bibtex-ruby-1.3.11 test/profile.rb
bibtex-ruby-1.3.10 test/profile.rb
bibtex-ruby-1.3.9 test/profile.rb
bibtex-ruby-1.3.8 test/profile.rb
bibtex-ruby-1.3.7 test/profile.rb
bibtex-ruby-1.3.6 test/profile.rb