Class | Mongrel::StatisticsFilter
In: | lib/mongrel/handlers.rb
Parent: | HttpHandler

Implements a few basic statistics for a particular URI. Register it anywhere you want in the request chain and it‘ll quickly gather some numbers for you to analyze. It is pretty fast, but don‘t put it out in production.

You should pass the filter to StatusHandler as StatusHandler.new(:stats_filter => stats). This lets you then hit the status URI you want and get these stats from a browser.

StatisticsFilter takes an option of :sample_rate. This is a number that‘s passed to rand and if that number gets hit then a sample is taken. This helps reduce the load and keeps the statistics valid (since sampling is a part of how they work).

The exception to :sample_rate is that inter-request time is sampled on every request. If this wasn‘t done then it wouldn‘t be accurate as a measure of time between requests.

### Methods

dump new process

### Attributes

stats | [R] |

### Public Class methods

new(ops={})

### Public Instance methods

dump()
process(request, response)

[Validate]