make the count....count (#2416)

(cherry picked from commit b6e642338a)
This commit is contained in:
pokeeffe-molecula 2023-01-18 10:35:14 -06:00 committed by Joe Friedrich
parent 965ad15829
commit f2812309ac

View file

@ -364,12 +364,14 @@ func (i *insertRowIter) Next(ctx context.Context) (types.Row, error) {
}
}
count := batch.Len()
if err := batch.Import(); err != nil {
return nil, errors.Wrap(err, "importing batch")
}
// update the counter for inserts
pilosa.PerfCounterSQLInsertsSec.Add(int64(batch.Len()))
pilosa.PerfCounterSQLInsertsSec.Add(int64(count))
return nil, types.ErrNoMoreRows
}