X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=options.c;h=580d5aa5b95800d707c3fff92a719cc4ac4b1c76;hp=1914037583fb24163936e18aac7b4473aed87728;hb=b94cba47cfdf96e72ec894080b3a7bf645a86e9c;hpb=d5e3a0c6f5376e0d76143edb2c1622efd77f995f diff --git a/options.c b/options.c index 19140375..580d5aa5 100644 --- a/options.c +++ b/options.c @@ -595,6 +595,14 @@ static char *get_next_file_name(char **ptr) return start; } +static int str_hostname_cb(void *data, const char *input) +{ + struct thread_data *td = data; + + td->o.filename = strdup(input); + return 0; +} + static int str_filename_cb(void *data, const char *input) { struct thread_data *td = data; @@ -749,6 +757,17 @@ static int str_write_lat_log_cb(void *data, const char *str) return 0; } +static int str_write_iops_log_cb(void *data, const char *str) +{ + struct thread_data *td = data; + + if (str) + td->o.iops_log_file = strdup(str); + + td->o.write_iops_log = 1; + return 0; +} + static int str_gtod_reduce_cb(void *data, int *il) { struct thread_data *td = data; @@ -860,6 +879,12 @@ static struct fio_option options[FIO_MAX_OPTS] = { .prio = -1, /* must come after "directory" */ .help = "File(s) to use for the workload", }, + { + .name = "hostname", + .type = FIO_OPT_STR_STORE, + .cb = str_hostname_cb, + .help = "Hostname for net IO engine", + }, { .name = "kb_base", .type = FIO_OPT_INT, @@ -1821,6 +1846,15 @@ static struct fio_option options[FIO_MAX_OPTS] = { .help = "Time window over which to calculate bandwidth" " (msec)", .def = "500", + .parent = "write_bw_log", + }, + { + .name = "iopsavgtime", + .type = FIO_OPT_INT, + .off1 = td_var_offset(iops_avg_time), + .help = "Time window over which to calculate IOPS (msec)", + .def = "500", + .parent = "write_iops_log", }, { .name = "create_serialize", @@ -1938,6 +1972,13 @@ static struct fio_option options[FIO_MAX_OPTS] = { .cb = str_write_lat_log_cb, .help = "Write log of latency during run", }, + { + .name = "write_iops_log", + .type = FIO_OPT_STR, + .off1 = td_var_offset(write_iops_log), + .cb = str_write_iops_log_cb, + .help = "Write log of IOPS during run", + }, { .name = "hugepage-size", .type = FIO_OPT_INT,