Module | Rack::MiniProfiler::ProfilingMethods |
In: |
lib/mini_profiler/profiling_methods.rb
|
Add a custom timing. These are displayed similar to SQL/query time in columns expanding to the right.
type - String counter type. Each distinct type gets its own column. duration_ms - Duration of the call in ms. Either this or a block must be
given but not both.
When a block is given, calculate the duration by yielding to the block and keeping a record of its run time.
Returns the result of the block, or nil when no block is given.