Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow score accumulation to be weighted by time #3

Open
dhosterman opened this issue Sep 29, 2016 · 0 comments
Open

Allow score accumulation to be weighted by time #3

dhosterman opened this issue Sep 29, 2016 · 0 comments
Assignees
Milestone

Comments

@dhosterman
Copy link
Owner

Currently, decay is completely time based whereas score accumulation is based on how frequently the decorated function is executed.

For instance, let's say we have the following:

@score(MyScorekeeper, 50, decay=5)
def my_func():
    pass

I can be assured that no matter how often I run my_func() in a given time, my decay will remain constant at 1 point every 5 seconds. However, the amount of score I can potentially accumulate during that same period depends entirely on how often I execute my_func().

So we have an issue where one factor is determined wholly by an outside influence (a cron job, for example) and the other is determined wholly by an inside influence (the decay).

Providing a way to weigh score accumulation by time will make using scorekeepers easier to reason about as well as mitigating a class of bug that could result from operations outside the package's control.

@dhosterman dhosterman added this to the v0.1.1 milestone Sep 29, 2016
@dhosterman dhosterman self-assigned this Sep 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant