README.md in fozzie-0.0.27 vs README.md in fozzie-1.0.0

- old
+ new

@@ -107,16 +107,35 @@ _monitor def zar # my code here... end + _monitor("my.awesome.bucket.name") + def quux + # something + end + end ``` This will register the processing time for this method, everytime it is called, under the Graphite bucket `foo_bar.zar`. This will work on both Class and Instance methods. +## Bulk + +You can send a bulk of metrics using the `bulk` method: +``` ruby +Stats.bulk do + increment 'wat' + decrement 'wot' + gauge 'foo', rand + time_to_do 'wat_timer' { sleep 4 } +end +``` + +This will send all the given metrics in a single packet to the statistics server. + ## Namespaces Fozzie supports the following namespaces as default ``` ruby @@ -183,30 +202,28 @@ Prefixes are cached on first use, therefore any changes to the Fozzie configure prefix after first metric is sent in your application will be ignored. ## Middleware -To time and register the controller actions within your Rails application, Fozzie provides some middleware. +To time and register the controller actions within your Rack and Rails application, Fozzie provides some middleware. ### Rack ``` ruby require 'rack' -require 'fozzie' +require 'fozzie/rack/middleware' app = Rack::Builder.new { use Fozzie::Rack::Middleware lambda { |env| [200, {'Content-Type' => 'text/plain'}, 'OK'] } } ``` ### Rails -Based on the Rack middleware above, but is more involved in its construction of the bucket value. +See [Fozzie Rails](http://github.com/lonelyplanet/fozzie_rails). -Fozzie::Rails::Middleware will automatically be invoked on Rails initialization. - ## Bucket name prefixes Fozzie automatically constructs bucket name prefixes from app name, hostname, and environment. For example: @@ -240,20 +257,14 @@ Fozzie.logger = Logger.new 'log/fozzie.log' ``` This may change, depending on feedback and more production experience. -## Rails User Interface Performance Measuring - -If you also require UI metrics, you can also include the Mill script in the bottom of any page you would like to measure (see `resources/mill.js` and `resources/mill.min.js`) and you start receiving measurements on page performance. - ## Credits Currently supported and maintained by [Marc Watts](marc.watts@lonelyplanet.co.uk) @ Lonely Planet Online. Big thanks and Credits: - -* [Mark Barger](mark.barger@lonelyplanet.co.uk) for support in trying to make this Gem useful. * [Dave Nolan](https://github.com/textgoeshere) * [Etsy](http://codeascraft.etsy.com/) whose [Statsd](https://github.com/etsy/statsd) product has enabled us to come such a long way in a very short period of time. We love Etsy.