From: Jens Axboe Date: Mon, 5 Feb 2007 14:04:46 +0000 (+0100) Subject: [PATCH] Add 'description' option X-Git-Tag: fio-1.12~139 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=61697c37566a211ad3fd70f46397d9b7675b0fc2 [PATCH] Add 'description' option Can help provide a textual description of a job, if it's submitted to someone for run/review. Signed-off-by: Jens Axboe --- diff --git a/HOWTO b/HOWTO index 198d70b5..f4ebac94 100644 --- a/HOWTO +++ b/HOWTO @@ -193,6 +193,10 @@ name=str ASCII name of the job. This may be used to override the special purpose of also signaling the start of a new job. +description=str Text description of the job. Doesn't do anything except + dump this text description when this job is run. It's + not parsed. + directory=str Prefix filenames with this directory. Used to places files in a different location than "./". diff --git a/README b/README index 2d5d4999..be32af4e 100644 --- a/README +++ b/README @@ -80,6 +80,7 @@ is in the ini style format, as it's easy to read and write for the user. The job file parameters are: name=x Use 'x' as the identifier for this job. + description=x 'x' is a text description of the job. directory=x Use 'x' as the top level directory for storing files filename=x Force the use of 'x' as the filename for all files in this thread. If not given, fio will make up diff --git a/fio.h b/fio.h index 6e0c5b18..c6fb6a11 100644 --- a/fio.h +++ b/fio.h @@ -176,6 +176,7 @@ struct fio_file { * This describes a single thread/process executing a fio job. */ struct thread_data { + char *description; char *name; char *directory; char *filename; diff --git a/init.c b/init.c index 365a8b2c..32e22dbe 100644 --- a/init.c +++ b/init.c @@ -41,6 +41,12 @@ static int str_cpumask_cb(void *, unsigned int *); * Map of job/command line options */ static struct fio_option options[] = { + { + .name = "description", + .type = FIO_OPT_STR_STORE, + .off1 = td_var_offset(description), + .help = "Text job description", + }, { .name = "name", .type = FIO_OPT_STR_STORE, diff --git a/stat.c b/stat.c index 636955e2..8ea1b8ad 100644 --- a/stat.c +++ b/stat.c @@ -409,6 +409,9 @@ static void show_thread_status(struct thread_data *td, } fprintf(f_out, " IO depths : 1=%3.1f%%, 2=%3.1f%%, 4=%3.1f%%, 8=%3.1f%%, 16=%3.1f%%, 32=%3.1f%%, >=64=%3.1f%%\n", io_u_dist[0], io_u_dist[1], io_u_dist[2], io_u_dist[3], io_u_dist[4], io_u_dist[5], io_u_dist[6]); + + if (td->description) + fprintf(f_out, "%s\n", td->description); } static void show_ddir_status_terse(struct thread_data *td,