return ret;
}
-void setup_log(struct io_log **log)
+void setup_log(struct io_log **log, unsigned long avg_msec, int log_type)
{
struct io_log *l = malloc(sizeof(*l));
+ memset(l, 0, sizeof(*l));
l->nr_samples = 0;
l->max_samples = 1024;
+ l->log_type = log_type;
l->log = malloc(l->max_samples * sizeof(struct io_sample));
+ l->avg_msec = avg_msec;
*log = l;
}
snprintf(file_name, 200, "%s_%s.log", prefix, postfix);
p = basename(file_name);
- __finish_log(log, p);
+
+ if (td->client_type == FIO_CLIENT_TYPE_GUI) {
+ fio_send_iolog(td, log, p);
+ free(log->log);
+ free(log);
+ } else
+ __finish_log(log, p);
}
void finish_log(struct thread_data *td, struct io_log *log, const char *name)