remove dead code, make the Azure Storage performance warnings less aggressive

This commit is contained in:
Sebastian Burckhardt 2020-11-02 08:43:26 -08:00
Родитель 8900f0e83d
Коммит b96aeaaf3e
3 изменённых файлов: 3 добавлений и 18 удалений

Просмотреть файл

@ -283,7 +283,7 @@ namespace DurableTask.Netherite.Faster
stopwatch.Stop(); stopwatch.Stop();
if (stopwatch.ElapsedMilliseconds > 1000) if (stopwatch.ElapsedMilliseconds > 1000 + length / 1000)
{ {
this.BlobManager?.TraceHelper.FasterPerfWarning($"CloudPageBlob.WritePagesAsync took {stopwatch.ElapsedMilliseconds:f1}ms, which is excessive; target={blob.Name} length={length} destinationAddress={destinationAddress + offset}"); this.BlobManager?.TraceHelper.FasterPerfWarning($"CloudPageBlob.WritePagesAsync took {stopwatch.ElapsedMilliseconds:f1}ms, which is excessive; target={blob.Name} length={length} destinationAddress={destinationAddress + offset}");
} }
@ -362,7 +362,7 @@ namespace DurableTask.Netherite.Faster
stopwatch.Stop(); stopwatch.Stop();
this.BlobManager?.StorageTracer?.FasterStorageProgress($"finished download target={blob.Name} readLength={readLength} sourceAddress={sourceAddress} latencyMs={stopwatch.Elapsed.TotalMilliseconds:F1}"); this.BlobManager?.StorageTracer?.FasterStorageProgress($"finished download target={blob.Name} readLength={readLength} sourceAddress={sourceAddress} latencyMs={stopwatch.Elapsed.TotalMilliseconds:F1}");
if (stopwatch.ElapsedMilliseconds > 1000) if (stopwatch.ElapsedMilliseconds > 1000 + readLength / 1000)
{ {
this.BlobManager?.TraceHelper.FasterPerfWarning($"CloudPageBlob.DownloadRangeToStreamAsync took {stopwatch.ElapsedMilliseconds / 1000}s, which is excessive; target={blob.Name} readLength={readLength} sourceAddress={sourceAddress}"); this.BlobManager?.TraceHelper.FasterPerfWarning($"CloudPageBlob.DownloadRangeToStreamAsync took {stopwatch.ElapsedMilliseconds / 1000}s, which is excessive; target={blob.Name} readLength={readLength} sourceAddress={sourceAddress}");
} }

Просмотреть файл

@ -97,7 +97,7 @@ namespace DurableTask.Netherite.Faster
stopwatch.Stop(); stopwatch.Stop();
this.azureStorageDevice.BlobManager?.StorageTracer?.FasterStorageProgress($"finished create page blob target={pageBlob.Name} size={size} latencyMs={stopwatch.Elapsed.TotalMilliseconds:F1}"); this.azureStorageDevice.BlobManager?.StorageTracer?.FasterStorageProgress($"finished create page blob target={pageBlob.Name} size={size} latencyMs={stopwatch.Elapsed.TotalMilliseconds:F1}");
if (stopwatch.ElapsedMilliseconds > 1000) if (stopwatch.ElapsedMilliseconds > 3000)
{ {
this.azureStorageDevice.BlobManager?.TraceHelper.FasterPerfWarning($"CloudPageBlob.CreateAsync took {stopwatch.ElapsedMilliseconds / 1000}s, which is excessive; target={pageBlob.Name} size={size}"); this.azureStorageDevice.BlobManager?.TraceHelper.FasterPerfWarning($"CloudPageBlob.CreateAsync took {stopwatch.ElapsedMilliseconds / 1000}s, which is excessive; target={pageBlob.Name} size={size}");
} }

Просмотреть файл

@ -206,7 +206,6 @@ namespace DurableTask.Netherite.Faster
await this.blobManager.StopAsync().ConfigureAwait(false); await this.blobManager.StopAsync().ConfigureAwait(false);
} }
public void SubmitExternalEvents(IList<PartitionEvent> evts) public void SubmitExternalEvents(IList<PartitionEvent> evts)
{ {
this.logWorker.SubmitExternalEvents(evts); this.logWorker.SubmitExternalEvents(evts);
@ -234,19 +233,5 @@ namespace DurableTask.Netherite.Faster
this.storeWorker.Notify(); this.storeWorker.Notify();
} }
} }
async Task TestStorageLatency()
{
Stopwatch stopwatch = new Stopwatch();
var blob = this.blobManager.BlockBlobContainer.GetBlockBlobReference("test");
var text = DateTime.UtcNow.ToString("o");
stopwatch.Start();
await blob.UploadTextAsync(text).ConfigureAwait(BlobManager.CONFIGURE_AWAIT_FOR_STORAGE_CALLS);
stopwatch.Stop();
if (stopwatch.ElapsedMilliseconds > 1000)
{
this.TraceHelper.FasterPerfWarning($"CloudBlockBlob.UploadTextAsync took {stopwatch.ElapsedMilliseconds / 1000}s, which is excessive; target={blob} content={text}");
}
}
} }
} }