Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Timeline Cred! #1212
The general approach is:
What this means intuitively: if pull requests have a weight of 4, then that means that a total of 4 cred will be created, and it will flow to people who did work associated with that pull request. Most of that 4 cred will be created and "released" in the week when that pull request was made, but it will still continue to flow out of the pull for a few weeks afterwards.
As compared to the implementation being shown off in the discourse post above, this implementation is 'productionized'. That basically means I gave more thought to the APIs, and added more testing. Also, the performance is a little better (about 12% better in my tests).
It's also factored such that it will be easy for us to get future performance wins, by using a mutable markov chain rather than re-creating a markov chain for each interval.
Test plan: The individual commits have testing, and I've used this branch along with a yet-to-be-merged UI for displaying timeline cred; the results it gives are reasonable.
Thanks to @mzargham for help choosing the algorithm.