Extend mtbf time range to also support hours and minutes.#263
Extend mtbf time range to also support hours and minutes.#263snarlistic wants to merge 4 commits into
Conversation
… function RandomTimeInRange completely replaces the ShouldScheduleChaos functionality.
|
Please forgive me for the confusion, but it bothered me a bit that I had complicated matters a bit. I misunderstood certain aspects of the RandomTimeInRange code my coworker wrote at first and so I did not fully understand it already implements the ShouldScheduleChaos functionality. Hence I wrote some complicated code that in the end was not needed. This I realized today and for that reason I updated this pull request with the extra commit: 03a90f0. Hope you now even like it better. :) |
|
Thanks for the contribution @snarlistic! |
|
@worldtiki any news? |
…e issues and ugliness. Extensively documented the code to make it clear what happens as the algorithm is a bit of the complex kind.
|
With a bit of shame I have to admit the code contained some issues and ugliness. My last commit solved both and I have this version running for some time now. Hopefully it is useful and you are open to accept my work. |
|
Have you lost interest in the project or is it that you are only unhappy about my work? We are running it for over a year now and it all works lovely. It might make a nice new release. 😇 |
This PR changes the definition of "kube-monkey/mtbf".
Alike https://github.com/misgod-yy in #168 we needed a more fine grained control for the mean time between failure. A couple of years ago a coworker of mine took the misgod-yy patches and updated a now very old version of your software, fixed the problems with that code and we have been using this happily ever since for several years now.
The downside of this approach was that we were still using this very old version of the software and recently decided that's not okay anymore. Hence I ported our patches to the newest version of your code and improved it a tiny bit. Please bare with me, this is the first Golang programming I did.
Please review my work. I think it solves all the issues you had with the more early work of https://github.com/misgod-yy. It for instance sticks to minutes, hours and days, it removed the weird naming and last but not least is no breaking change as one can specify days as a simply integer (old style) and as an integer with an additional d-unit (new-style).
I hope you like it.