Nonblocking StatHat Ruby Gem Released

We changed the stathat Ruby gem to improve the performance. It uses a queue of data points and a pool of threads servicing the queue. Your calls to send data to StatHat will no longer wait for the HTTP request to finish.

Run

gem update stathat

to get the latest version.

The API function calls did not change, but they no longer return the response. If you’d like to examine the response, you can use a block:

StatHat::API.ez_post_value("request time", "test@stathat.com", 12.3) do |r|
    unless r.valid?
        puts "Error sending data to StatHat.  Status #{r.status}, Message: #{r.msg}."
    end
end

Let us know if we can do anything to help you use this gem in your applications.


Comments? Send us a tweet.

Permalink:

Previous:
Automatically Run Go Tests When Files Change (OS X)
Next:
Campfire Integration