func checkPointBatcherStats(t *testing.T, b *tsdb.PointBatcher, batchTotal, pointTotal, sizeTotal, timeoutTotal int) { stats := b.Stats() if batchTotal != -1 && stats.BatchTotal != uint64(batchTotal) { t.Errorf("batch total stat is incorrect: %d", stats.BatchTotal) } if pointTotal != -1 && stats.PointTotal != uint64(pointTotal) { t.Errorf("point total stat is incorrect: %d", stats.PointTotal) } if sizeTotal != -1 && stats.SizeTotal != uint64(sizeTotal) { t.Errorf("size total stat is incorrect: %d", stats.SizeTotal) } if timeoutTotal != -1 && stats.TimeoutTotal != uint64(timeoutTotal) { t.Errorf("timeout total stat is incorrect: %d", stats.TimeoutTotal) } }