Permalink
Browse files

the epilogue should also be printed to the specified IO

  • Loading branch information...
goncalossilva authored and dbussink committed Mar 26, 2011
1 parent 536a6eb commit 4cc294981d1b708ab80fc026a68a46cc61197120
Showing with 5 additions and 5 deletions.
  1. +5 −5 kernel/delta/profiler.rb
View
@@ -96,11 +96,11 @@ def show(out=$stdout)
nil
end
def epilogue(size, calls)
def epilogue(out, size, calls)
unless options[:full_report] or size < SHORT_LINES
puts "\n#{comma(size-SHORT_LINES)} methods omitted"
out.puts "\n#{comma(size-SHORT_LINES)} methods omitted"
end
puts "\n#{comma(size)} methods called a total of #{comma(calls)} times"
out.puts "\n#{comma(size)} methods called a total of #{comma(calls)} times"
end
def flat(out)
@@ -160,7 +160,7 @@ def flat(out)
out.printf "%8.2f %8.2f %10d %8.2f %8.2f %s\n", *d.last(6)
end
epilogue data.size, total_calls
epilogue out, data.size, total_calls
if options[:classes]
classes = Hash.new { |h,k| h[k] = 0.0 }
@@ -311,7 +311,7 @@ def graph(out)
out.puts "-------------------------------------------------------"
end
epilogue data.size, total_calls
epilogue out, data.size, total_calls
end
def graph_method_index(index)

0 comments on commit 4cc2949

Please sign in to comment.