Sha256: f5a5179ffec39a8de2b17ea5f5c73bc55beec106abe5068f72d609961932a7c9
Contents?: true
Size: 654 Bytes
Versions: 2
Compression:
Stored size: 654 Bytes
Contents
#!/opt/local/bin/ruby ENV['LOGGER'] = 'false' 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.all end end # require 'benchmark' # # N = 100_000 # # Benchmark::bmbm do |x| # x.report do # N.times do # Inflector.underscore('DataMapper') # end # end # # x.report do # N.times do # String::memoized_underscore('DataMapper') # end # end # end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
datamapper-0.2.0 | profile_data_mapper.rb |
datamapper-0.1.1 | profile_data_mapper.rb |