Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge [8355] from trunk: fix strange NoMemoryError on amd64. References

#10442 [wrb]

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/1-2-stable@8356 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit e85fcc0518605ca1602a1353bbb616ad2a34e351 1 parent 1878f6c
@jeremy jeremy authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 actionpack/lib/action_controller/benchmarking.rb
View
7 actionpack/lib/action_controller/benchmarking.rb
@@ -75,15 +75,16 @@ def perform_action_with_benchmark
private
def rendering_runtime(runtime)
- " | Rendering: #{sprintf("%.5f", @rendering_runtime)} (#{sprintf("%d", (@rendering_runtime * 100) / runtime)}%)"
+ percentage = @rendering_runtime * 100 / runtime
+ " | Rendering: %.5f (%d%%)" % [@rendering_runtime, percentage.to_i]
end
def active_record_runtime(runtime)
db_runtime = ActiveRecord::Base.connection.reset_runtime
db_runtime += @db_rt_before_render if @db_rt_before_render
db_runtime += @db_rt_after_render if @db_rt_after_render
- db_percentage = (db_runtime * 100) / runtime
- " | DB: #{sprintf("%.5f", db_runtime)} (#{sprintf("%d", db_percentage)}%)"
+ db_percentage = db_runtime * 100 / runtime
+ " | DB: %.5f (%d%%)" % [db_runtime, db_percentage.to_i]
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.