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 = '[email protected]' # 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)