[PATCH] Add name=x option to name jobs
This makes it easier to see what is going on with large job files.
diff --git a/init.c b/init.c
index d2122e3..46c5132 100644
--- a/init.c
+++ b/init.c
@@ -251,10 +251,13 @@
if (write_bw_log)
setup_log(&td->bw_log);
+ if (td->name[0] == '\0')
+ snprintf(td->name, sizeof(td->name)-1, "client%d", td->thread_number);
+
ddir = td->ddir + (!td->sequential << 1) + (td->iomix << 2);
if (!job_add_num)
- printf("Client%d (g=%d): rw=%s, odir=%d, bs=%d-%d, rate=%d, ioengine=%s, iodepth=%d\n", td->thread_number, td->groupid, ddir_str[ddir], td->odirect, td->min_bs, td->max_bs, td->rate, td->io_engine_name, td->iodepth);
+ printf("%s: (g=%d): rw=%s, odir=%d, bs=%d-%d, rate=%d, ioengine=%s, iodepth=%d\n", td->name, td->groupid, ddir_str[ddir], td->odirect, td->min_bs, td->max_bs, td->rate, td->io_engine_name, td->iodepth);
else if (job_add_num == 1)
printf("...\n");
@@ -877,6 +880,11 @@
fgetpos(f, &off);
continue;
}
+ if (!check_strstore(p, "name", tmpbuf)) {
+ snprintf(td->name, sizeof(td->name)-1, "%s%d", tmpbuf, td->thread_number);
+ fgetpos(f, &off);
+ continue;
+ }
if (!check_str(p, "mem", str_mem_cb, td)) {
fgetpos(f, &off);
continue;