You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the main things that I stated were important to me going into this project is that it should be fast. While I have attempted to code in such a way that it makes the project efficient, I do not currently have any tests set up specifically for capturing how fast different aspects of the code work.
Proposed additional tests:
Test the overall speed of the project from import all the way to getting a dice roll
Test the underlying rolling functions
Test the functions when called through Click
Considerations:
It is likely going to be difficult to test how quick these things are as a CLI command because likely a good portion of the time that is spent is by Python itself getting everything loaded such that it can run our code.
I think though that, since we cannot really change that fact, we should really focus on the time that it takes to go from importing our code all the way to rolling a dice as our metric since that's what we control.
Why we should do this:
I think that this is going to be leveraged heavily on whether or not changing certain elements of the code to Cython (Convert parser to Cython #29) is beneficial and will allow us to better state exactly how beneficial it actually is rather than simply "it seems faster", especially as that feeling may be in part due to expectations and not based in reality.
How:
I think this can be done via pytest using something like the built-in timeit library. We can probably do warnings if code gets slower than it currently is and completely fail the code if it takes too much time.
The concept of too much time and whether something is slower than the current time are both things that I will likely have to figure out through testing. I want the rolls to generally feel instantaneous. For websites to feel that way, they generally have to be under 700ms from memory.
The text was updated successfully, but these errors were encountered:
One of the main things that I stated were important to me going into this project is that it should be fast. While I have attempted to code in such a way that it makes the project efficient, I do not currently have any tests set up specifically for capturing how fast different aspects of the code work.
Proposed additional tests:
Considerations:
Why we should do this:
How:
The text was updated successfully, but these errors were encountered: