mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
only report result size when result is not null
This commit is contained in:
parent
45bd31b77e
commit
3792865f43
@ -11,7 +11,7 @@ import com.amazonaws.services.dynamodbv2.document.spec.GetItemSpec;
|
||||
*/
|
||||
public class DDBGetItemOp extends DynamoDBOp {
|
||||
private final Table table;
|
||||
private GetItemSpec getItemSpec;
|
||||
private final GetItemSpec getItemSpec;
|
||||
private long resultSize=-1;
|
||||
|
||||
public DDBGetItemOp(DynamoDB ddb, Table table, GetItemSpec getItemSpec) {
|
||||
@ -23,7 +23,9 @@ public class DDBGetItemOp extends DynamoDBOp {
|
||||
@Override
|
||||
public Item apply(long value) {
|
||||
Item result = table.getItem(getItemSpec);
|
||||
if (result!=null) {
|
||||
resultSize=result.numberOfAttributes();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user