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

This commit is contained in:
pokeeffe-molecula 2023-01-18 10:35:14 -06:00 • committed by GitHub
parent 2fccb87dcf
commit b6e642338a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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
}