renamed last_avg_execs -> last_avg_total_execs

This should make it a bit more clear that it stores the total number of executions from the previous update
This commit is contained in:
Martin Leitner-Ankerl
2024-12-19 07:59:45 +01:00
parent 99402aa31c
commit 9afba51ec1
2 changed files with 3 additions and 3 deletions

View File

@ -747,7 +747,7 @@ typedef struct afl_state {
up to 256 */ up to 256 */
unsigned long long int last_avg_exec_update; unsigned long long int last_avg_exec_update;
u64 last_avg_execs; u64 last_avg_total_execs;
double last_avg_execs_saved; double last_avg_execs_saved;
/* foreign sync */ /* foreign sync */

View File

@ -340,9 +340,9 @@ void write_stats_file(afl_state_t *afl, u32 t_bytes, double bitmap_cvg,
cur_time - afl->last_avg_exec_update >= 60000))) { cur_time - afl->last_avg_exec_update >= 60000))) {
afl->last_avg_execs_saved = afl->last_avg_execs_saved =
(double)(1000 * (afl->fsrv.total_execs - afl->last_avg_execs)) / (double)(1000 * (afl->fsrv.total_execs - afl->last_avg_total_execs)) /
(double)(cur_time - afl->last_avg_exec_update); (double)(cur_time - afl->last_avg_exec_update);
afl->last_avg_execs = afl->fsrv.total_execs; afl->last_avg_total_execs = afl->fsrv.total_execs;
afl->last_avg_exec_update = cur_time; afl->last_avg_exec_update = cur_time;
} }