Sha256: bd9452cbdd28f8c36d4118fe667c3b65359d6b287f2adc00ebfd8e6fa32b2f67

Contents?: true

Size: 348 Bytes

Versions: 1

Compression:

Stored size: 348 Bytes

Contents

require 'example'
require 'ruby-prof'

# RubyProf, making profiling Ruby pretty since 1899!
def profile(&b)
  result = RubyProf.profile &b

  printer = RubyProf::GraphHtmlPrinter.new(result)
  File::open('profile_results.html', 'w+') do |file|
    printer.print(file, 0)
  end
end

profile do
  1000.times do
    Zoo[:name => 'Galveston']
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
datamapper-0.1.0 profile_data_mapper.rb