The
AppStats tool contains much of the functionality you'd want if you were looking to profile your RPC calls (such as Datastore query), although knowing that a
Datastore.query occurred won't tell you how many entities were fetched.
In order to get a better picture of the source of your Datastore reads, you should do an analysis of your codebase to determine where Datastore reads can occur, and also determine whether there are any limit() or offset() operations being applied. In the absence of these, . Then, associate these locations in code with the requests that will activate them. Finally, perform an analysis of your logs to determine how often each route is being called, thus allowing you to determine how often each potential Datastore read location is being called. In order to analyze your logs, you should use the
Logs API.
If you have a handler on the route
/account/details that will perform a Datastore read of the past N records for your user's account when
/account/details?depth=N is requested, you'll be able to determine this information while iterating through your logs for the day, and tally up the number of reads that are likely to have occurred.
Finally, you can read a collection of great tips on managing Datastore resource usage in this docs article:
Managing App Resources.