It looks like the documentation is out of date, and there's been an issue filed to have it updated. Indeed, there is only one instance of __Stat_Total__, and the recommendation is to just fetch 1 entity and retry if no entities were returned.
On Monday, July 11, 2016 at 11:49:45 AM UTC-4, Evan Jones wrote: > > The documentation for datastore statistics states: > > https://cloud.google.com/appengine/docs/python/datastore/stats > > "When the statistics system creates new statistic entities, it does not > delete the old ones right away. The best way to get a consistent view of > the statistics is to query for the GlobalStat entity with the most recent > timestamp, then use that timestamp value as a filter when fetching other > statistic entities." > > This contracts itself: "For example, each app has exactly one entity of > the kind __Stat_Total__" > > I've tried across two separate projects, and I only ever get a single > GlobalStat entity. The documentation implies that I might see multiple > instances, with different timestamps. However, looking at the keys for the > entity, I'm not sure how that is possible. For example, for GlobalStat, > the key path is something like "/__Stat_Total__,total_entity_usage". > Without some sort of version or date included in that key, I don't see how > it is possible there could be multiple versions. > > > Is this documentation wrong and out of date now, and that there is only > ever the single, most recent version of the datastore statistics? > > Thanks! > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/eff8a8b8-340f-4078-bf2c-6e5eda9a3471%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
