Sha256: d3aa1a5cd28bac4f3493cf211f4daef5f95dd855cafc8557da4c69d0563de14d

Contents?: true

Size: 728 Bytes

Versions: 3

Compression:

Stored size: 728 Bytes

Contents

require File.expand_path('../test_helper', __FILE__)

require 'ruby-prof'

require 'parser/current'
Parser::Builders::Default.emit_lambda   = true
Parser::Builders::Default.emit_procarg0 = true
Parser::Builders::Default.emit_encoding = true
Parser::Builders::Default.emit_index    = true

start = Time.now
result = RubyProf.profile(:measure_mode => RubyProf::ALLOCATIONS, :track_allocations => true) do
  code = File.read('C:/msys64/usr/local/src/ruby-2.6.3/lib/rdoc/markdown.rb')
  parse = Parser::CurrentRuby.parse(code)
end

finish = Time.now

puts "#{finish - start} seconds"

printer = RubyProf::GraphHtmlPrinter.new(result)
File.open('c:/temp/graph.html', 'wb') do |file|
  printer.print(file)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby-prof-1.1.0-x64-mingw32 test/parser_timings.rb
ruby-prof-1.1.0 test/parser_timings.rb
ruby-prof-1.0.0 test/parser_timings.rb