rcrowley/go-metrics — pull request #25 by schmichael (2013-10-29 18:34:00+00:00)
Title: Add GetOrRegister method for threadsafe metric registration

Advantages over existing metric creation and registration:

* A single statement creates and registers a metric.
* Unused metrics will now be a compiler error (previously all metrics
would be "used" at least once when registering them).
* The only threadsafe way to dynamically get-or-create metrics without
wrapping the existing interface.
* Able to get/create metrics locally instead using global variables.