Sha256: c4bad3276ebb0b7fb4acb1d6dd91e734bbbc55916c7ef2b43e3ae97274bad407
Contents?: true
Size: 720 Bytes
Versions: 6
Compression:
Stored size: 720 Bytes
Contents
require 'gitrb' require 'fileutils' require 'grit' require 'ruby-prof' REPO = '/tmp/gitrb' FileUtils.rm_rf REPO FileUtils.mkpath REPO repo = Gitrb::Repository.new(:path => REPO, :create => true) repo.transaction { 'aaa'.upto('jjj') { |key| repo.root[key] = Gitrb::Blob.new(:data => rand.to_s) } } result = RubyProf.profile do Gitrb::Repository.new(:path => '.').root.values { |v| v } end printer = RubyProf::GraphHtmlPrinter.new(result) printer.print(File.open('gitrb.html', 'w'), :min_percent => 10) result = RubyProf.profile do Grit::Repo.new(:path => '.').tree.contents.each { |e| e.data } end printer = RubyProf::GraphHtmlPrinter.new(result) printer.print(File.open('grit.html', 'w'), :min_percent => 10)
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
gitrb-0.2.1 | test/profile.rb |
gitrb-0.2.0 | test/profile.rb |
gitrb-0.1.9 | test/profile.rb |
gitrb-0.1.8 | test/profile.rb |
gitrb-0.1.7 | test/profile.rb |
gitrb-0.1.6 | test/profile.rb |