X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=iolog.c;h=7b212bb598f124c3ce745e8f08918d4d0efd4f4d;hp=1d61ba23ac3ba82b6334ad45dc0a16aee7babd49;hb=ca20381d58f54a469da1f4b2771c304995bc7f5e;hpb=d401b24d00244223f04ddeee0c563909ad7f4f31 diff --git a/iolog.c b/iolog.c index 1d61ba23..7b212bb5 100644 --- a/iolog.c +++ b/iolog.c @@ -492,13 +492,14 @@ int init_iolog(struct thread_data *td) return ret; } -void setup_log(struct io_log **log, unsigned long avg_msec) +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; @@ -534,7 +535,13 @@ void finish_log_named(struct thread_data *td, struct io_log *log, 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)