2013-01-19 17:48:30 +04:00
|
|
|
// Copyright (c) 2012, Matt T. Proud
|
|
|
|
// All rights reserved.
|
|
|
|
//
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
2012-05-24 22:02:44 +04:00
|
|
|
|
|
|
|
package metrics
|
|
|
|
|
2013-01-19 17:48:30 +04:00
|
|
|
// A Metric is something that can be exposed via the registry framework.
|
2012-05-24 22:02:44 +04:00
|
|
|
type Metric interface {
|
2013-01-19 17:48:30 +04:00
|
|
|
// Produce a JSON-consumable representation of the metric.
|
|
|
|
AsMarshallable() map[string]interface{}
|
|
|
|
// Reset the parent metrics and delete all child metrics.
|
|
|
|
ResetAll()
|
|
|
|
// Produce a human-consumable representation of the metric.
|
2012-12-19 14:10:09 +04:00
|
|
|
String() string
|
2012-05-24 22:02:44 +04:00
|
|
|
}
|