Commit Graph

6 Commits

Author SHA1 Message Date
stuart nelson d01fd62222 new handler instrumentation (#285)
Add new HTTP handler instrumentation
2017-04-24 15:13:19 -04:00
beorn7 89ca0458cb Change the Timer API
This finally makes the (presumably) common simple case as simple as it
gets.

The still quite common (but less common) case of using a Gauge is
slightly more verbose now, but not needing to provide a separate
constructor is totally worth it.

Finally, the advanced use case is not really more verbose as in my
original suggestion. However, the logic to decide which Observer to
use is now all in the ObserverFunc handed in at construction
time. This is deliberate and desired. It makes sure the selection
mechanism is all spelled out there. No surprises buried deep in the
function code somewhere.
2016-11-18 20:32:18 +01:00
beorn7 8aba21aba3 Completed tests 2016-11-18 20:32:18 +01:00
beorn7 120be69578 Change timer naming from Start/Stop to New/ObserveDuration 2016-11-18 20:32:18 +01:00
beorn7 8496756f6d Turn timer helper into a struct with methods 2016-11-18 20:32:18 +01:00
stuart nelson d845abb9f9 Add timer helper function 2016-11-18 20:32:18 +01:00