+ if (o->lat_log_file) {
+ struct log_params p = {
+ .td = td,
+ .avg_msec = o->log_avg_msec,
+ .log_type = IO_LOG_TYPE_LAT,
+ .log_offset = o->log_offset,
+ .log_gz = o->log_gz,
+ .log_gz_store = o->log_gz_store,
+ };
+ const char *suf;
+
+ if (p.log_gz_store)
+ suf = "log.fz";
+ else
+ suf = "log";
+
+ snprintf(logname, sizeof(logname), "%s_lat.%d.%s",
+ o->lat_log_file, td->thread_number, suf);
+ setup_log(&td->lat_log, &p, logname);
+ snprintf(logname, sizeof(logname), "%s_slat.%d.%s",
+ o->lat_log_file, td->thread_number, suf);
+ setup_log(&td->slat_log, &p, logname);
+ snprintf(logname, sizeof(logname), "%s_clat.%d.%s",
+ o->lat_log_file, td->thread_number, suf);
+ setup_log(&td->clat_log, &p, logname);
+ }
+ if (o->bw_log_file) {
+ struct log_params p = {
+ .td = td,
+ .avg_msec = o->log_avg_msec,
+ .log_type = IO_LOG_TYPE_BW,
+ .log_offset = o->log_offset,
+ .log_gz = o->log_gz,
+ .log_gz_store = o->log_gz_store,
+ };
+ const char *suf;
+
+ if (p.log_gz_store)
+ suf = "log.fz";
+ else
+ suf = "log";
+
+ snprintf(logname, sizeof(logname), "%s_bw.%d.%s",
+ o->bw_log_file, td->thread_number, suf);
+ setup_log(&td->bw_log, &p, logname);
+ }
+ if (o->iops_log_file) {
+ struct log_params p = {
+ .td = td,
+ .avg_msec = o->log_avg_msec,
+ .log_type = IO_LOG_TYPE_IOPS,
+ .log_offset = o->log_offset,
+ .log_gz = o->log_gz,
+ .log_gz_store = o->log_gz_store,
+ };
+ const char *suf;
+
+ if (p.log_gz_store)
+ suf = "log.fz";
+ else
+ suf = "log";
+
+ snprintf(logname, sizeof(logname), "%s_iops.%d.%s",
+ o->iops_log_file, td->thread_number, suf);
+ setup_log(&td->iops_log, &p, logname);