diff options
author | vanhauser-thc <vh@thc.org> | 2023-03-27 17:51:53 +0200 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2023-03-27 17:52:01 +0200 |
commit | b1bfc1ae76bacbf48b81c81480a9f32e0c8919f6 (patch) | |
tree | 7cdcf7af55f384b7f2580c3894de270619171024 /src/afl-fuzz-queue.c | |
parent | 0faa323f121f16faba9b8fe20552a421b09d5ec3 (diff) | |
download | afl++-b1bfc1ae76bacbf48b81c81480a9f32e0c8919f6.tar.gz |
time_wo_finds in fuzzer_stats
Diffstat (limited to 'src/afl-fuzz-queue.c')
-rw-r--r-- | src/afl-fuzz-queue.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/afl-fuzz-queue.c b/src/afl-fuzz-queue.c index 4eb55bb3..40184645 100644 --- a/src/afl-fuzz-queue.c +++ b/src/afl-fuzz-queue.c @@ -577,7 +577,24 @@ void add_to_queue(afl_state_t *afl, u8 *fname, u32 len, u8 passed_det) { queue_buf[afl->queued_items - 1] = q; q->id = afl->queued_items - 1; - afl->last_find_time = get_cur_time(); + u64 cur_time = get_cur_time(); + + if (likely(afl->start_time) && + unlikely(afl->longest_find_time < cur_time - afl->last_find_time)) { + + if (unlikely(!afl->last_find_time)) { + + afl->longest_find_time = cur_time - afl->start_time; + + } else { + + afl->longest_find_time = cur_time - afl->last_find_time; + + } + + } + + afl->last_find_time = cur_time; if (afl->custom_mutators_count) { |