Add support for idletime profiling

Idletime profiling allows a benchmark to run while filling the
idle cycles on the server, hence giving you some metric of how
much pressure the system is under. This is useful to be able
to profile and compare changes in a setup or driver, for instance.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/stat.c b/stat.c
index 5cc6b7b..7e2feea 100644
--- a/stat.c
+++ b/stat.c
@@ -12,6 +12,7 @@
 #include "lib/ieee754.h"
 #include "json.h"
 #include "lib/getrusage.h"
+#include "idletime.h"
 
 void update_rusage_stat(struct thread_data *td)
 {
@@ -1335,6 +1336,8 @@
 		/* disk util stats, if any */
 		show_disk_util(1, root);
 
+		show_idle_prof_stats(FIO_OUTPUT_JSON, root);
+
 		json_print_object(root);
 		log_info("\n");
 		json_free_object(root);
@@ -1355,6 +1358,8 @@
 	else if (output_format == FIO_OUTPUT_NORMAL)
 		show_disk_util(0, NULL);
 
+	show_idle_prof_stats(FIO_OUTPUT_NORMAL, NULL);
+
 	free(runstats);
 	free(threadstats);
 }