Add options for disabling slat/clat/bw measurements
Useful for cutting down on the number of gettimeofday calls in
situations where that does impact performance. This is mostly for
really high IOPS rates.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/ioengines.c b/ioengines.c
index 3ef0d03..9daeaab 100644
--- a/ioengines.c
+++ b/ioengines.c
@@ -210,6 +210,15 @@
return r;
}
+static inline int get_issue_time(struct thread_data *td)
+{
+ if (td->o.read_iolog_file ||
+ !td->o.disable_clat || !td->o.disable_slat || !td->o.disable_bw)
+ return 1;
+
+ return 0;
+}
+
int td_io_queue(struct thread_data *td, struct io_u *io_u)
{
int ret;
@@ -226,7 +235,8 @@
io_u->resid = 0;
if (td->io_ops->flags & FIO_SYNCIO) {
- fio_gettime(&io_u->issue_time, NULL);
+ if (get_issue_time(td))
+ fio_gettime(&io_u->issue_time, NULL);
/*
* only used for iolog
@@ -269,7 +279,8 @@
}
if ((td->io_ops->flags & FIO_SYNCIO) == 0) {
- fio_gettime(&io_u->issue_time, NULL);
+ if (get_issue_time(td))
+ fio_gettime(&io_u->issue_time, NULL);
/*
* only used for iolog