An EventMachine-compatible async wrapper for the stathat api.
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
.rvmrc
.travis.yml
Gemfile
MIT-LICENSE
README.md
Rakefile
em-stathat.gemspec

README.md

Build Status

What

An Eventmachine-compatible wrapper for the stathat api (http://stathat.com), built on top of em-http-request.

NOTE: Currently, only the EZ api is supported.

Usage

Configure your settings:

EM::StatHat.config do |c|
  c.ukey  = 'your unique user key'
  c.email = 'user@example.com' # for sending stats via the EZ api
end

Send stats using the EZ api

Timers

EM::StatHat.new.time('stat name') do
  # code to profile
end

Counts

EM::StatHat.new.ez_count('Users Created', 1) # defaults to 1

Values

EM::StatHat.new.ez_value('some metric', 123)

Reference

Copyright

Copyright (c) 2011-2012 Alex Sharp. See the MIT-LICENSE file for full copyright information.