Skip to content

Commit

Permalink
Reduce command-line refresh frequency. (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
aoli-al committed Aug 22, 2024
1 parent 75bc041 commit e2a0537
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions core/src/main/kotlin/org/pastalab/fray/core/TestRunner.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import org.pastalab.fray.runtime.Runtime
class TestRunner(val config: Configuration) {

val context = RunContext(config)
var currentDivision = 1

val logger: Logger = config.loggerContext.getLogger(TestRunner::class.java)

Expand All @@ -19,11 +20,16 @@ class TestRunner(val config: Configuration) {
}

fun reportProgress(iteration: Int, bugsFound: Int) {
print("\u001B[2J")
print("\u001B[2H")
println("Fray Testing:")
println("Iterations: $iteration")
println("Bugs Found: $bugsFound")
if (iteration % currentDivision == 0) {
print("\u001B[2J")
print("\u001B[2H")
println("Fray Testing:")
println("Iterations: $iteration")
println("Bugs Found: $bugsFound")
}
if (iteration / currentDivision == 10) {
currentDivision *= 10
}
}

fun run(): Throwable? {
Expand Down

0 comments on commit e2a0537

Please sign in to comment.