Plugins - custom_benchmarks

StarAdd to favorites

Custom Benchmarks allow you to easily add your own information to the
benchmark line logged at the end of each request. e.g.,

Completed in 0.40306 (2 reqs/sec) | Rendering: 0.05003 (12%) | DB: 0.04571 (11%) | Search: 0.16429,1 (40%) | PID: 22426 | 200 OK [http://www.zvents.com/welcome/index]

Typically, the log line includes the latency associated with executing
specific parts of a request. In the example above, we have added a
measurement of search latency. But you can use Custom Benchmarks to add
any information to the log line. The example above also shows the ID of
the process (PID) that served this request. The PID is useful when parsing
information from logs that contain data from multiple processes.

Adding your own information is as easy as:

class ApplicationController < ActionController::Base
custom_benchmark {|runtime| " | PID: #{$$}" }
...
end

Tyler Kovacs

http://blog.zvents.com/2006/10/31/rails-plugin-custom-benchmarks

svn://rubyforge.org/var/svn/zventstools/projects/custom_benchmarks

Rails' (MIT)

  • Currently 0.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Statistics and Logs

Tags

Comments

Add a comment

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.
Recruiting software

Have a comment?