mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-23 02:30:12 +01:00
Froze the Rails gems and RedCloth into the vendor directory, so that these will be used instead of any local version of Rails which might be incompatible. Should also mean that you don't need to install RedCloth locally to make Tracks work (I'm not sure whether this also applies to Rails, and don't want to uninstall my local Rails gems to find out!)
Effectively fixes #159. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@176 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
825bad76a7
commit
c392296680
751 changed files with 94570 additions and 4 deletions
35
tracks/vendor/rails/railties/lib/rubyprof_ext.rb
vendored
Normal file
35
tracks/vendor/rails/railties/lib/rubyprof_ext.rb
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
require 'prof'
|
||||
|
||||
module Prof #:nodoc:
|
||||
# Adapted from Shugo Maeda's unprof.rb
|
||||
def self.print_profile(results, io = $stderr)
|
||||
total = results.detect { |i|
|
||||
i.method_class.nil? && i.method_id == :"#toplevel"
|
||||
}.total_time
|
||||
total = 0.001 if total < 0.001
|
||||
|
||||
io.puts " %% cumulative self self total"
|
||||
io.puts " time seconds seconds calls ms/call ms/call name"
|
||||
|
||||
sum = 0.0
|
||||
for r in results
|
||||
sum += r.self_time
|
||||
|
||||
name = if r.method_class.nil?
|
||||
r.method_id.to_s
|
||||
elsif r.method_class.is_a?(Class)
|
||||
"#{r.method_class}##{r.method_id}"
|
||||
else
|
||||
"#{r.method_class}.#{r.method_id}"
|
||||
end
|
||||
io.printf "%6.2f %8.3f %8.3f %8d %8.2f %8.2f %s\n",
|
||||
r.self_time / total * 100,
|
||||
sum,
|
||||
r.self_time,
|
||||
r.count,
|
||||
r.self_time * 1000 / r.count,
|
||||
r.total_time * 1000 / r.count,
|
||||
name
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue