Sha256: acad8c9f77f608b2734d877bbf262d56af20d4f662b2eb7ce8839899ce72d8ea
Contents?: true
Size: 810 Bytes
Versions: 13
Compression:
Stored size: 810 Bytes
Contents
require File.expand_path('../lib/bibtex.rb', __dir__) 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 *= 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', __dir__), 'w'), min_percent: 5)
Version data entries
13 entries across 13 versions & 2 rubygems