wheatley icon indicating copy to clipboard operation
wheatley copied to clipboard

Allow ringing sessions to be recorded and played back as test cases

Open kneasle opened this issue 3 years ago • 2 comments

This would provide an excellent mechanism for testing Wheatley's performance, since if we mocked the Tower class and make the sleep function just increment a counter then we can simulate Wheatley ringing for huge amounts of time.

If someone else wants to have a crack at this then they're very welcome, but if I had to do it I'd probably do something like:

  1. Move all the knowledge of timing (i.e. time.time() and time.sleep()) into the Tower class so that it can be mocked easily.
  2. Make some kind of running mode which records the events passing through the Tower class and records them to some format (probably JSON)
  3. Make a mocked version of Tower which never interacts with RR but instead replays any given simulation using mocked sleep and time functions to go wayyyy faster than real time.

kneasle avatar May 02 '21 12:05 kneasle