Skip to main content
Version: 5.11.4

How to check

Summary

The read capacity or write capacity is displayed when a success response is received by calling the method related to game information via Backend.PlayerData.
(The cases of read capacity and write capacity below are only examples; details may differ based on the called information.)

Upon registering user data

returnValue : {"ConsumedCapacity":{"Write":{"CapacityUnits":3}},"inDate":"2023-10-28T11:00:38.611Z"}

Upon loading user data

returnValue : {"serverTime":"2023-10-28T11:02:36.894Z","rows":[...],"firstKey":null,"ConsumedCapacity":{"Read":{"CapacityUnits":0.5}}}

Upon modifying user data

returnValue : {"ConsumedCapacity":{"Read":{"CapacityUnits":6},"Write":{"CapacityUnits":4}}}

Upon deleting user data

returnValue : {"ConsumedCapacity":{"Write":{"CapacityUnits":3}}}

Upon writing transaction

returnValue : {"putItem":[...],"ConsumedCapacity":[{"Write":{"CapacityUnits":24},"Read":{"CapacityUnits":0}}]}

Upon reading transaction

returnValue : {"Responses":[...],"ConsumedCapacity":[{"Read":{"CapacityUnits":27}}]}

How to parse

You can check the returnValue through the process below:

var bro = Backend.PlayerData.InsertData("tableName");
if(bro.IsSuccess()) {
Debug.Log("write volume : " + bro.GetReturnValueToJson()["ConsumedCapacity"]["Write"]["CapacityUnits"]);
}

GetWriteCapacity

With the parsing procedure above, you can easily identify the write capacity through a method using float.
When an error occurs, the method will return 0.0f when called.

var bro = Backend.PlayerData.InsertData("tableName");
if(bro.IsSuccess()) {
float capacity = bro.GetWriteCapacity();
Debug.Log("write capacity : " + capacity);
}

GetReadCapacity

With the parsing procedure above, you can easily identify the read capacity through a method using float.
When an error occurs, the method will return 0.0f when called.

var bro = Backend.PlayerData.GetMyLatestData("tableName");
if(bro.IsSuccess()) {
float capacity = bro.GetReadCapcity();
Debug.Log("Read capacity : " + capacity);
}