Skip to content

Commit

Permalink
add iteration duration log on fuzz
Browse files Browse the repository at this point in the history
  • Loading branch information
hyp3rflow committed May 22, 2024
1 parent 2ff0152 commit 1b6a280
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/scala/esmeta/es/util/fuzzer/Fuzzer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ class Fuzzer(
/** one trial to fuzz new programs to increase coverage */
def fuzz: Unit =
iter += 1

val startTime = System.currentTimeMillis
debugging(("-" * 40) + f" iter: $iter%10d " + ("-" * 40))
for (bound <- logInterval) {
val seconds = bound * 1000
Expand Down Expand Up @@ -162,6 +164,9 @@ class Fuzzer(
update(selectorName, selectorStat, result)
update(mutatorName, mutatorStat, result)

val duration = Time(System.currentTimeMillis - startTime)
debugging(s"iter/end: $iter - $duration")

/** Case class to hold the information about a candidate */
case class CandInfo(
visited: Boolean = false,
Expand Down

0 comments on commit 1b6a280

Please sign in to comment.