Datastore Statistics: Is history ever still available?

48 views
Skip to first unread message

Evan Jones

unread,
Jul 11, 2016, 11:49:45 AM7/11/16
to Google App Engine
The documentation for datastore statistics states:


"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!

Adam (Cloud Platform Support)

unread,
Jul 18, 2016, 1:09:07 PM7/18/16
to Google App Engine
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.
Reply all
Reply to author
Forward
0 new messages