public string GetDebugInfo(IIndexSession indexSession) { if (_count++ == _batchSize) { var info = indexSession.GetIndexInfo(); var t = _time.Elapsed.TotalSeconds; var docsPerSecond = (int)(_batchSize / t); var debug = string.Join('\n', info.Info.Select(x => x.ToString())); var message = $"\n{_time.Elapsed}\nbatch {++_batchNo}\n{debug}\n{docsPerSecond} docs/s"; _count = 0; _time.Restart(); return(message); } return(null); }
public void Step(IIndexSession indexSession, int steps) { _steps += steps; if (_steps % _sampleSize == 0) { var info = indexSession.GetIndexInfo(); var t = _time.Elapsed.TotalSeconds; var docsPerSecond = (int)(_sampleSize / t); var debug = string.Join('\n', info.Info.Select(x => x.ToString())); _batchNo++; var message = $"\n{_time.Elapsed}\ntotal {_sampleSize * _batchNo}\n{debug}\n{docsPerSecond} docs/s"; _logger.LogInformation(message); _time.Restart(); } }