stryker4s icon indicating copy to clipboard operation
stryker4s copied to clipboard

ETA Calculator

Open hugo-vrijswijk opened this issue 5 years ago • 3 comments

See #153.

It'd be great to have some sort of ETA calculation to show users how much longer we estimate the mutation run will take. The PR linked above is a great start and already reviewed a lot, but is outdated as we refactored the reporters since. A new start that copies code from that PR is probably better. It could either be a new reporter, or added to the ConsoleReporter.

Some ideas of mine of what this could include (feel free to add/discuss):

  • Using the median of the last 10 (?) runs as an ETA
  • A time formatted ETA
  • Some sort of progress bar by using a third-party library

hugo-vrijswijk avatar Sep 26 '19 07:09 hugo-vrijswijk

Since you perform the initial test run, shouldn't it serve as a baseline for duration? Rather than having to wait for N runs until you can have some a median value...

cbrunnkvist avatar Sep 30 '20 08:09 cbrunnkvist

On that note: in case the time per run is more than trivial (let's say >10 seconds) and the number of mutants is more than trivial (let's say >10 also for good measure) then we must assume that the console output is probably also full of exceptions and other leaking log messages because at that point the code base is of some size. In these situations tracking the progress becomes unpractical.

How about adding (through a config toggle) a sleep(1s) between Finished mutation run 10/257 (4%) and Starting test-run 11... just as a courtesy to the developer when trying have a change to follow on the console what the current progress is?

cbrunnkvist avatar Sep 30 '20 09:09 cbrunnkvist

Sorry for the late reply 😅. I quite like the idea of limiting the amount of messages outputted to the user in the scenario you outlined. The console reporter is due for a rework anyway. A configurable setting using something like FS2's .metered might be enough to get something quite nice working

hugo-vrijswijk avatar Nov 17 '20 13:11 hugo-vrijswijk