stryker-mutator / stryker4s

Mutation testing for Scala
https://stryker-mutator.io
Apache License 2.0
199 stars 37 forks source link

ETA Calculator #267

Open hugo-vrijswijk opened 5 years ago

hugo-vrijswijk commented 5 years ago

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):

cbrunnkvist commented 4 years ago

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 commented 4 years ago

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?

hugo-vrijswijk commented 3 years ago

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