Added basic docs for leaderboards, and fixtures

This commit is contained in:
Tom Bloor 2017-08-21 15:11:05 +01:00
parent e49d806308
commit 6c35bc36e0
3 changed files with 69 additions and 7 deletions

View file

@ -1,12 +1,16 @@
# Leaderboards
## Calculation
The leaderboards are calculated for the previous range - so Daily leaderboards
are calculated for the whole of the day before, Weeks from the week before,
etc. - The only exception is all time, which is calculated from 00:00 on the
current day.
## Recalculation
To figure out if a Leaderboard needs recalculation, the easiest way is to get
the transaction set that it corresponds to, and compare either the sum or count
of that result set to the sum of the leaderboard values.
Leaderboard recalculation only affects the latest two leaderboards for any set,
so just need to recalculate the last one and the current one, in that order.
This can be done during the regular leaderboard calculation cronjob, so
verified transactions will show up in the leaderboards the next day.
This can be done at any time, but if recalculation is needed then ALL
leaderboards newer than one that doesnt match (of the same type) will need
recalculating due to possible position changes, and therefore the trend
changing.