mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-13 18:48:08 +00:00
Define config, change parent func to show_stats
This commit is contained in:
@ -46,6 +46,7 @@ Server config can be adjusted with AFL_STATSD_HOST and AFL_STATSD_PORT env var.
|
||||
*/
|
||||
|
||||
#define USE_STATSD
|
||||
#define STATSD_UPDATE_SEC 1
|
||||
|
||||
/* If you want to have the original afl internal memory corruption checks.
|
||||
Disabled by default for speed. it is better to use "make ASAN_BUILD=1". */
|
||||
|
@ -901,12 +901,6 @@ common_fuzz_stuff(afl_state_t *afl, u8 *out_buf, u32 len) {
|
||||
afl->stage_cur + 1 == afl->stage_max) {
|
||||
|
||||
show_stats(afl);
|
||||
#ifdef USE_STATSD
|
||||
if(send_statsd_metric(afl)){
|
||||
//Change me to something realistic; don't fail on connection / lookup fail for metrics...
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -422,6 +422,14 @@ void show_stats(afl_state_t *afl) {
|
||||
|
||||
}
|
||||
|
||||
#ifdef USE_STATSD
|
||||
if (cur_ms - afl->stats_last_stats_ms > STATSD_UPDATE_SEC * 1000) {
|
||||
if(send_statsd_metric(afl)){
|
||||
WARNF("coundln't send statsd metric.");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Every now and then, write plot data. */
|
||||
|
||||
if (cur_ms - afl->stats_last_plot_ms > PLOT_UPDATE_SEC * 1000) {
|
||||
|
Reference in New Issue
Block a user