/*
* This function leaks the buffer
*/
-static char *to_kmg(unsigned int val)
+char *fio_uint_to_kmg(unsigned int val)
{
char *buf = malloc(32);
char post[] = { 0, 'K', 'M', 'G', 'P', 'E', 0 };
goto err;
if (td->o.write_lat_log) {
- setup_log(&td->lat_log, td->o.log_avg_msec);
- setup_log(&td->slat_log, td->o.log_avg_msec);
- setup_log(&td->clat_log, td->o.log_avg_msec);
+ setup_log(&td->lat_log, td->o.log_avg_msec, IO_LOG_TYPE_LAT);
+ setup_log(&td->slat_log, td->o.log_avg_msec, IO_LOG_TYPE_SLAT);
+ setup_log(&td->clat_log, td->o.log_avg_msec, IO_LOG_TYPE_CLAT);
}
if (td->o.write_bw_log)
- setup_log(&td->bw_log, td->o.log_avg_msec);
+ setup_log(&td->bw_log, td->o.log_avg_msec, IO_LOG_TYPE_BW);
if (td->o.write_iops_log)
- setup_log(&td->iops_log, td->o.log_avg_msec);
+ setup_log(&td->iops_log, td->o.log_avg_msec, IO_LOG_TYPE_IOPS);
if (!td->o.name)
td->o.name = strdup(jobname);
if (!terse_output) {
if (!job_add_num) {
if (is_backend && !recursed)
- fio_server_send_add_job(&td->o, td->io_ops->name);
+ fio_server_send_add_job(td);
if (!strcmp(td->io_ops->name, "cpuio")) {
log_info("%s: ioengine=cpu, cpuload=%u,"
} else {
char *c1, *c2, *c3, *c4;
- c1 = to_kmg(td->o.min_bs[DDIR_READ]);
- c2 = to_kmg(td->o.max_bs[DDIR_READ]);
- c3 = to_kmg(td->o.min_bs[DDIR_WRITE]);
- c4 = to_kmg(td->o.max_bs[DDIR_WRITE]);
+ c1 = fio_uint_to_kmg(td->o.min_bs[DDIR_READ]);
+ c2 = fio_uint_to_kmg(td->o.max_bs[DDIR_READ]);
+ c3 = fio_uint_to_kmg(td->o.min_bs[DDIR_WRITE]);
+ c4 = fio_uint_to_kmg(td->o.max_bs[DDIR_WRITE]);
log_info("%s: (g=%d): rw=%s, bs=%s-%s/%s-%s,"
" ioengine=%s, iodepth=%u\n",