rack-mini-profiler

https://github.com/miniprofiler/rack-mini-profiler

Ruby

Profiler for your development and production Ruby rack apps.

Rack::MiniProfiler::ProfilingMethods#counter

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.

Source | Google | Stack overflow

Edit

git clone [email protected]:miniprofiler/rack-mini-profiler.git

cd rack-mini-profiler

open lib/mini_profiler/profiling_methods.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Rack--MiniProfiler--ProfilingMethods-counter-for-pr


# Commit to git

git add lib/mini_profiler/profiling_methods.rbgit commit -m "better docs for Rack::MiniProfiler::ProfilingMethods#counter"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Rack--MiniProfiler--ProfilingMethods-counter-for-pr

hub pull-request


# Celebrate!