about summary refs log tree commit diff
path: root/src/afl-fuzz.c
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2020-05-07 18:33:38 +0200
committerhexcoder- <heiko@hexco.de>2020-05-07 18:33:38 +0200
commitd217c7df055b9ca44e5398d8c7d50d43e0b2e56d (patch)
tree39b381389f65c029a6bdb6dae9bba9c9ec4160e6 /src/afl-fuzz.c
parent9484da57ed3f421ac274ac51282dba779994da9a (diff)
parentef2ccc8117bb899616472e2d95525ae0ca1a2098 (diff)
downloadafl++-d217c7df055b9ca44e5398d8c7d50d43e0b2e56d.tar.gz
Merge branch 'dev' of https://github.com/AFLplusplus/AFLplusplus into dev
Diffstat (limited to 'src/afl-fuzz.c')
-rw-r--r--src/afl-fuzz.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index 5920f5c0..64973260 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -27,6 +27,10 @@
 #include "cmplog.h"
 #include <limits.h>
 
+#ifdef PROFILING
+extern u64 time_spent_working;
+#endif
+
 static u8 *get_libradamsa_path(u8 *own_loc) {
 
   u8 *tmp, *cp, *rsl, *own_copy;
@@ -1351,6 +1355,13 @@ stop_fuzzing:
 
   }
 
+#ifdef PROFILING
+  SAYF(cYEL "[!] " cRST
+            "Profiling information: %llu ms total work, %llu ns/run\n",
+       time_spent_working / 1000000,
+       time_spent_working / afl->fsrv.total_execs);
+#endif
+
   fclose(afl->fsrv.plot_file);
   destroy_queue(afl);
   destroy_extras(afl);