#!/usr/bin/env ruby require 'mastalk' require 'ruby-prof' cms_page_content = File.read(File.join('spec', 'fixtures', 'cms_page_content')) PAGES_SIZE = 500 puts '*' * 80 puts "Profiling: parsing #{PAGES_SIZE} pages." puts '*' * 80 result = RubyProf.profile do PAGES_SIZE.times do Mastalk::Document.new(cms_page_content).to_html end end printer = RubyProf::MultiPrinter.new(result) printer.print(path: 'profiling_results', profile: 'mastalk_profiling')