Skip to content

Instantly share code, notes, and snippets.

@rsynnott
rsynnott / scantest.scala
Last active April 24, 2016 22:38
How many capacity units does a dynamodb scan use
def scanSizeTest(client: AmazonDynamoDBClient, tableName: String) = {
val recordCount = 100
var recordSize = 10
populateTable(client, tableName, recordCount, recordSize)
print(s"For batchGet of $recordCount count of $recordSize byte records (${recordCount * recordSize} bytes), used ${batchGetTable(client, tableName, recordCount)} units\n")
print(s"For scan of $recordCount count of $recordSize byte records (${recordCount * recordSize} bytes), used ${scanTable(client, tableName)} units\n")