Sha256: 415c6003e61b73f05297ee48d63ecf2657e1bd30043471970042a049db749234
Contents?: true
Size: 605 Bytes
Versions: 5
Compression:
Stored size: 605 Bytes
Contents
require 'ruby-prof' require 'undies' require 'bench/procs' class UndiesProfilerRunner attr_reader :result def initialize(size) file = "bench/#{size || 'large'}.html.rb" @source = Undies::Source.new(File.expand_path(file)) @data = {} @io = Undies::IO.new(@out = "") @result = RubyProf.profile do Undies::Template.new(@source, @data, @io) end end def print_flat(outstream, opts={}) RubyProf::FlatPrinter.new(@result).print(outstream, opts) end def print_graph(outstream, opts={}) RubyProf::GraphPrinter.new(@result).print(outstream, opts) end end
Version data entries
5 entries across 5 versions & 1 rubygems