Skip to content

Commit

Permalink
the epilogue should also be printed to the specified IO
Browse files Browse the repository at this point in the history
  • Loading branch information
goncalossilva authored and dbussink committed Mar 28, 2011
1 parent 536a6eb commit 4cc2949
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions kernel/delta/profiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 }
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 4cc2949

Please sign in to comment.