Sha256: c9f7ec21d2b0fc414c50715468807eef71dc1a25246ddf513677b8adfbe3adec

Contents?: true

Size: 719 Bytes

Versions: 17

Compression:

Stored size: 719 Bytes

Contents

#!/usr/bin/env ruby
# File: script/profile_subject

require File.expand_path(File.join(File.dirname(__FILE__), %w[.. lib ri_cal]))
require 'rubygems'
subject_name = ARGV[0] || "paris_eastern"

require File.expand_path(File.join(File.dirname(__FILE__), %w[.. performance], [subject_name], "subject"))

devnul = Object.new
def devnul.puts(string)
end

subject = Subject.new(devnul)

require 'ruby-prof'

result = RubyProf.profile do
  subject.run
end

out_file = File.expand_path(File.join(File.dirname(__FILE__), %w[.. performance_data], "#{subject_name}.calltree"))
puts "out_file is #{out_file}"
printer = RubyProf::CallTreePrinter.new(result)
puts "got printer"

File.open(out_file, 'w') do |f|
  printer.print(f)
end

Version data entries

17 entries across 17 versions & 8 rubygems

Version Path
demingfactor-ri_cal-0.10.0 script/profile_subject
demingfactor-ri_cal-0.9.0 script/profile_subject
rubyredrick-ri_cal-0.8.2 script/profile_subject
rubyredrick-ri_cal-0.8.4 script/profile_subject
friflaj_ri_cal-0.9.0 script/profile_subject
awallis-ri_cal-0.8.8 script/profile_subject
justinsoong-ri_cal-0.8.9 script/profile_subject
justinsoong-ri_cal-0.8.8 script/profile_subject
micahwedemeyer-ri_cal-0.8.10 script/profile_subject
micahwedemeyer-ri_cal-0.8.9 script/profile_subject
ri_cal-0.8.8 script/profile_subject
ri_cal-0.8.7 script/profile_subject
ri_cal-0.8.6 script/profile_subject
miguelbaldi-ri_cal-0.1 script/profile_subject
ri_cal-0.8.5 script/profile_subject
ri_cal-0.8.4 script/profile_subject
ri_cal-0.8.2 script/profile_subject