about summary refs log tree commit diff
path: root/src/afl-fuzz-stats.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/afl-fuzz-stats.c')
-rw-r--r--src/afl-fuzz-stats.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/afl-fuzz-stats.c b/src/afl-fuzz-stats.c
index 942670b4..0d6c6a66 100644
--- a/src/afl-fuzz-stats.c
+++ b/src/afl-fuzz-stats.c
@@ -423,16 +423,17 @@ void show_stats(afl_state_t *afl) {
 
   }
 
-#ifdef USE_STATSD
-  if (cur_ms - afl->statsd_last_send_ms > STATSD_UPDATE_SEC * 1000) {
+  if (unlikely(afl->afl_env.afl_statsd == 1)) {
 
-    /* reset counter, even if send failed. */
-    afl->statsd_last_send_ms = cur_ms;
-    if (statsd_send_metric(afl)) { WARNF("coundln't send statsd metric."); }
+    if (cur_ms - afl->statsd_last_send_ms > STATSD_UPDATE_SEC * 1000) {
 
-  }
+      /* reset counter, even if send failed. */
+      afl->statsd_last_send_ms = cur_ms;
+      if (statsd_send_metric(afl)) { WARNF("coundln't send statsd metric."); }
 
-#endif
+    }
+
+  }
 
   /* Every now and then, write plot data. */