Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Instrument latency as close to the syscall as possible
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
readme.md
unicorn-instruments.gemspec
unicorn-instruments.rb

readme.md

unicorn-instruments

This is a hack in order to account for the total time spent in ruby while processing http requests.

Usage

gem 'unicorn-instruments'

Require the gem in your unincorn config file.

config/unicorn.rb

require 'unicorn-instruments'
...

Synopsis

Start a timer.
Call accept().
Call send().
Close socket.
Stop timer.
Print Elapsed time.

If the timer elapsed for 4ms, the following log line will be printed:

measure=unicorn.process val=4

Using this data with l2met you can plot the unicorn processing time with the router service time. The difference between the values will be the time spent in the Heroku network.

img

Something went wrong with that request. Please try again.