AddMetricSamples adds the given metric samples to the internal buffer.
(samples []metrics.SampleContainer)
| 20 | |
| 21 | // AddMetricSamples adds the given metric samples to the internal buffer. |
| 22 | func (sc *SampleBuffer) AddMetricSamples(samples []metrics.SampleContainer) { |
| 23 | if len(samples) == 0 { |
| 24 | return |
| 25 | } |
| 26 | sc.Lock() |
| 27 | sc.buffer = append(sc.buffer, samples...) |
| 28 | sc.Unlock() |
| 29 | } |
| 30 | |
| 31 | // GetBufferedSamples returns the currently buffered metric samples and makes a |
| 32 | // new internal buffer with some hopefully realistic size. If the internal |