Project

em-stathat

0.01
No commit activity in last 3 years
No release in over 3 years
Essentially a clone of the normal stathat gem, only for use with EventMachine.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

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.