Skip to content

Instantly share code, notes, and snippets.

@OksanaH
Created Dec 4, 2020
Embed
What would you like to do?
private static async Task CopySlowly()
{
Stopwatch sw = new Stopwatch();
sw.Start();
var request = new ScanRequest
{
TableName = sourceTableName
};
var result = await client.ScanAsync(request, default);
foreach (var item in result.Items)
{
var putItemRequest = new PutItemRequest
{
TableName = destinationTableNameSlow,
Item = item
};
await client.PutItemAsync(putItemRequest, default);
}
sw.Stop();
Console.Write($"Copy slow - {sw.ElapsedMilliseconds} milliseconds elapsed");
Console.ReadLine();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment