Documentation ¶
Index ¶
- Variables
- func Flag() *string
- func Inc(name string)
- func Time(name string, du time.Duration)
- func TimeSince(name string, t time.Time)
- type ClearableTimer
- type ExportFormatStrings
- type Guage
- type Histogram
- type Meter
- type Recorder
- func (r *Recorder) EnableGCInfoCollection() *Recorder
- func (r *Recorder) FlushNow()
- func (r *Recorder) GetGuage(name string) Guage
- func (r *Recorder) GetHistogram(name string) Histogram
- func (r *Recorder) GetMeter(name string) Meter
- func (r *Recorder) GetTimer(name string) Timer
- func (r *Recorder) Inc(name string)
- func (r *Recorder) LogToConsole(freq time.Duration) *Recorder
- func (r *Recorder) MaybeReportTo(serverSlashPrefix *string) *Recorder
- func (r *Recorder) RegisterGuageValue(name string, reportEvery time.Duration, get func() float64)
- func (r *Recorder) RegisterHttp() *Recorder
- func (r *Recorder) ReportTo(serverSlashPrefix string) *Recorder
- func (r *Recorder) ReportToServer(graphiteServer, graphitePrefix string) *Recorder
- func (r *Recorder) ServeHTTP(out http.ResponseWriter, req *http.Request)
- func (r *Recorder) SetAsDefault() *Recorder
- func (r *Recorder) Time(name string, du time.Duration)
- func (r *Recorder) TimeSince(name string, t time.Time)
- type Timer
Constants ¶
This section is empty.
Variables ¶
View Source
var ExportFormats = GoMetricsFormats
View Source
var GoMetricsFormats = ExportFormatStrings{
Counter: "%s.%s.count %d %s\n",
HistogramCount: "%s.%s.count %d %s\n",
Gauge: "%s.%s.value %d %s\n",
GaugeFloat64: "%s.%s.value %f %s\n",
Min: "%s.%s.min %d %s\n",
Max: "%s.%s.max %d %s\n",
Mean: "%s.%s.mean %.2f %s\n",
Stddev: "%s.%s.std-dev %.2f %s\n",
Percentile: "%s.%s.%s-percentile %.2f %s\n",
Rate1: "%s.%s.one-minute %.2f %s\n",
Rate5: "%s.%s.five-minute %.2f %s\n",
Rate15: "%s.%s.fifteen-minute %.2f %s\n",
}
View Source
var OstrichFormats = ExportFormatStrings{
Counter: "%s.%s.count %d %s\n",
HistogramCount: "%s.%s.count %d %s\n",
Gauge: "%s.%s.value %d %s\n",
GaugeFloat64: "%s.%s.value %f %s\n",
Min: "%s.%s.min %d %s\n",
Max: "%s.%s.max %d %s\n",
Mean: "%s.%s.mean %.2f %s\n",
Stddev: "%s.%s.std-dev %.2f %s\n",
Percentile: "%s.%s.percentiles.p%s %.2f %s\n",
Rate1: "%s.%s.one-minute %.2f %s\n",
Rate5: "%s.%s.five-minute %.2f %s\n",
Rate15: "%s.%s.fifteen-minute %.2f %s\n",
}
An alternate export format that formats percentile paths more like twitter's ostrich.
Functions ¶
Types ¶
type ClearableTimer ¶
type ClearableTimer struct { metrics.Timer // contains filtered or unexported fields }
func (*ClearableTimer) Clear ¶
func (c *ClearableTimer) Clear()
type ExportFormatStrings ¶
type Recorder ¶
type Recorder struct { metrics.Registry Format ExportFormatStrings DurationUnit time.Duration // Time conversion unit for durations Prefix string // Prefix to be prepended to metric names Percentiles []float64 // Percentiles to export from timers and histograms // contains filtered or unexported fields }
func GetDefault ¶
func GetDefault() *Recorder
func NewRecorder ¶
func NewRecorder() *Recorder
func (*Recorder) EnableGCInfoCollection ¶
func (*Recorder) GetHistogram ¶
func (*Recorder) MaybeReportTo ¶
func (*Recorder) RegisterGuageValue ¶
func (*Recorder) RegisterHttp ¶
func (*Recorder) ReportToServer ¶
func (*Recorder) ServeHTTP ¶
func (r *Recorder) ServeHTTP(out http.ResponseWriter, req *http.Request)
func (*Recorder) SetAsDefault ¶
Click to show internal directories.
Click to hide internal directories.