Skip to content

Commit

Permalink
all: cleanup duplicate import statements
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill committed Jun 13, 2023
1 parent 28b1328 commit 54c7124
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 60 deletions.
9 changes: 4 additions & 5 deletions docstore/awsdynamodb/benchmark_test.go
Expand Up @@ -24,7 +24,6 @@ import (
awscreds "github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/dynamodb"
dyn "github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/aws/aws-sdk-go/service/dynamodb/expression"
)

Expand All @@ -47,9 +46,9 @@ func BenchmarkPutVSTransact(b *testing.B) {
var items []map[string]*dynamodb.AttributeValue
for i := 0; i < nItems; i++ {
items = append(items, map[string]*dynamodb.AttributeValue{
"name": new(dyn.AttributeValue).SetS(fmt.Sprintf("pt-vs-transact-%d", i)),
"x": new(dyn.AttributeValue).SetN(strconv.Itoa(i)),
"rev": new(dyn.AttributeValue).SetN("1"),
"name": new(dynamodb.AttributeValue).SetS(fmt.Sprintf("pt-vs-transact-%d", i)),
"x": new(dynamodb.AttributeValue).SetN(strconv.Itoa(i)),
"rev": new(dynamodb.AttributeValue).SetN("1"),
})
}
for _, item := range items {
Expand Down Expand Up @@ -105,7 +104,7 @@ func putItems(b *testing.B, db *dynamodb.DynamoDB, items []map[string]*dynamodb.

func batchGetTransactWrite(b *testing.B, db *dynamodb.DynamoDB, items []map[string]*dynamodb.AttributeValue) {
keys := make([]map[string]*dynamodb.AttributeValue, len(items))
tws := make([]*dyn.TransactWriteItem, len(items))
tws := make([]*dynamodb.TransactWriteItem, len(items))
for i, item := range items {
keys[i] = map[string]*dynamodb.AttributeValue{"name": items[i]["name"]}
item["x"].SetN(strconv.Itoa(i + 2))
Expand Down

0 comments on commit 54c7124

Please sign in to comment.