1

I need to get Google Datastore usage statistics - storage usage, and record count for my application.

At the moment I only can count fetch all items and count them. But I have no idea how I can get storage amount used.

Is there any reports API I can use? (Like Google Apps report api)

PS. I use gcloud-python library to access Datastore.

Edited:

Thank you Andrei - Angels Like Reb

That's how I did it:

from gcloud import datastore
stat = list(datastore.Query('__Stat_Total__').fetch())[0]
print "bytes", stat['bytes']
print "count", stat['count']
Dan McGrath
  • 41,220
  • 11
  • 99
  • 130
Renat
  • 417
  • 4
  • 12

1 Answers1

3

You can use statistics queries.

Andrei Volgin
  • 40,755
  • 6
  • 49
  • 58