Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatagramBufferPool ¶
type DatagramBufferPool struct {
// contains filtered or unexported fields
}
DatabramBufferPool is a strongly typed wrapper around a sync.Pool for *[][]byte
func NewDatagramBufferPool ¶
func NewDatagramBufferPool(bufferSize int) *DatagramBufferPool
func (*DatagramBufferPool) Get ¶
func (p *DatagramBufferPool) Get() *[][]byte
func (*DatagramBufferPool) Put ¶
func (p *DatagramBufferPool) Put(b *[][]byte)
type MetricPool ¶
type MetricPool struct {
// contains filtered or unexported fields
}
MetricPool is a strongly typed wrapper around a sync.Pool for *gostatsd.Metric, it provides two main benefits: 1) metrics are very short lived and we create a lot of them, 2) reuse of the tags buffer
func NewMetricPool ¶
func NewMetricPool(estimatedTags int) *MetricPool
NewMetricPool returns a new metric pool.
func (*MetricPool) Get ¶
func (mp *MetricPool) Get() *gostatsd.Metric
Get returns a *gostatsd.Metric suitable for holding a metric. The DoneFunc should be called when the metric is no longer required, it must not be called earlier. The Tags field may be reused, so any usage of tags must be be Tags.Copy()'d before calling Metric.Done()
Click to show internal directories.
Click to hide internal directories.