internal void StopExporterTimerAndTransmitFromStorage() { // Get export end time long exportEndTimeInMilliseconds = _stopwatch.ElapsedMilliseconds; // Calculate duration and add it to data sample long currentBatchExportDurationInMilliseconds = exportEndTimeInMilliseconds - _exportStartTimeInMilliseconds; _storageTransmissionEvaluator.AddExportDurationToDataSample(currentBatchExportDurationInMilliseconds); // Get max number of files we can transmit in this export and start transmitting long maxFilesToTransmit = _storageTransmissionEvaluator.GetMaxFilesToTransmitFromStorage(); _transmitter.TransmitFromStorage(maxFilesToTransmit, false, CancellationToken.None); }