use aggregated data for usergameactivity #1925
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Because this page no longer reads the Activity table, some historical data is lost. Sessions have to be generated only from unlock timestamps - we can no longer rely on the StartedPlaying Activity entries. Similarly, achievements that have been reset will no longer appear on the page as the historical unlock information is no longer available.
New sessions (created after v5 was deployed) should now be accurately captured instead of estimated.
For legacy data, the estimations are no longer as accurate. Here's one user playing an RPG:
Without the Activity table data, the same user/game:
7 sessions were extrapolated from the Activity table that contain no unlocks. These sessions would previously contribute to the overall time played through the estimated session extension logic. Similarly, without the StartedPlaying Activity entries, the lead up to the first achievement unlocked in a session is not captured (in this case it's almost two hours into the session):
As a result of the lead-up time missing, the session extension calculation is smaller, and without the "empty" sessions, the number of sessions that gets extended is smaller, which results in a much lower estimate (16 hours instead of 28).
Since it's just an estimate, we can't know which is more accurate. The loss of the lead-up time clearly makes the estimate too low, but the calculated session extension value could be overcorrecting for shorter sessions. And we have no idea whatsoever how long the sessions where achievements weren't earned were.
We want to get rid of the Activity table. Unfortunately, doing so does decrease the accuracy of the information provided on this page for historical data, but the newer data should be more accurate as it gets populated. Additionally, as this page is no longer database intensive, it might be possible to open it up to more users in the future.