Print progress only if enough time has passed. #701
Currently progress is printed after every test, which can cause a significant portion of the total test time taken to be used by printing if each test runs quickly. You also get a distracting flashing cursor when the updates occur too frequently.
As a real world example r-lib/fs@master...sanitize adds a bunch of tests which happen very fast, the total time taken for all tests in the fs package with the current master of testthat is ~5.973 seconds. With this PR the total time drops to is 4.254 seconds, a considerable change considering it is just test printing overhead.
This PR currently reuses the min_time parameter, which seems to work ok, 1/10 of a second is a reasonable amount of time between updates. But if necessary we could add an additional option or hardcode it to some other value.
Ok I changed how this was implemented slightly, there is now a separate
The following WARNING currently happens to any package built on R-devel with vignettes > checking serialized R objects in the sources ... WARNING > Found file(s) with version 3 serialization: > ‘build/vignette.rds’ > Such files are only readable in R >= 3.5.0. > Recreate them with R < 3.5.0 or save(version = 2) or saveRDS(version = > 2) as appropriate