add comment about why we batch
parent
4b18ddedec
commit
79fe16fb6c
|
@ -755,7 +755,9 @@ func MapStddev(itr Iterator, e *Emitter, tmax int64) {
|
|||
|
||||
for k, v := itr.Next(); k != 0; k, v = itr.Next() {
|
||||
values = append(values, v.(float64))
|
||||
// Emit in batches
|
||||
// Emit in batches.
|
||||
// unbounded emission of data can lead to excessive memory use
|
||||
// or other potential performance problems.
|
||||
if len(values) == emitBatchSize {
|
||||
e.Emit(Key{tmax, itr.Tags()}, values)
|
||||
values = []float64{}
|
||||
|
|
Loading…
Reference in New Issue