Commit Graph

505 Commits

Author SHA1 Message Date
Bernerd Schaefer 71dd60e431 Registry and Metrics implement json.Marshaler
* Drop `AsMarshallable()` from the Metric interface. Use
  `json.Marshaler` and `MarshalJSON()`, and leverage JSON struct tags
  where possible.

* Add `MarshalJSON()` to Registry and remove `dumpToWriter`, which
  makes the registry handler much simpler.

In addition to simplifying some of the marshalling behavior, this also
has the nice side effect of cutting down the number of
`map[string]interface{}` instances.
2013-04-19 15:07:24 +02:00
Bernerd Schaefer 3433b798b3 Use raw string literals in tests 2013-04-19 15:04:07 +02:00
Bernerd Schaefer 0b30e065c8 Metrics explicitly implement Metric interface 2013-04-19 15:04:07 +02:00
Bernerd Schaefer 9fccb96989 Remove timer.go and timer_test.go 2013-04-19 14:44:15 +02:00
Matt T. Proud f320d28a6c Rearrange file and package per convention.
WIP - Please review but do not merge.
2013-04-04 15:27:09 +02:00