Module: ActionController::Benchmarking::ClassMethods

Module | ActionController::Benchmarking::ClassMethods
In: | lib/action_controller/benchmarking.rb

### Methods

benchmark silence

### Public Instance methods

benchmark(title, log_level = Logger::DEBUG, use_silence = true) {|| ...}

Log and benchmark the workings of a single block and silence whatever logging that may have happened inside it (unless `use_silence` is set to false).

The benchmark is only recorded if the current level of the logger matches the `log_level`, which makes it easy to include benchmarking statements in production software that will remain inexpensive because the benchmark will only be conducted if the log level is low enough.

silence() {|| ...}

Silences the logger for the duration of the block.

[Validate]