X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=stat.c;h=1c1dceb5beccbe3cd6e1950addf1ab93d5b22937;hp=e47b510f55d20f65e065d0807a20f81dd3402182;hb=876e10015bc3191a71512c3ae57482bf1add4e0e;hpb=66e19a387c9d9ae79d7ae34376c6d421c4afe1be diff --git a/stat.c b/stat.c index e47b510f..1c1dceb5 100644 --- a/stat.c +++ b/stat.c @@ -1087,7 +1087,7 @@ static void show_thread_status_terse_v3_v4(struct thread_stat *ts, } static void json_add_job_opts(struct json_object *root, const char *name, - struct flist_head *opt_list) + struct flist_head *opt_list, bool num_jobs) { struct json_object *dir_object; struct flist_head *entry; @@ -1103,6 +1103,8 @@ static void json_add_job_opts(struct json_object *root, const char *name, const char *pos = ""; p = flist_entry(entry, struct print_option, list); + if (!num_jobs && !strcmp(p->name, "numjobs")) + continue; if (p->value) pos = p->value; json_object_add_value_string(dir_object, p->name, pos); @@ -1135,7 +1137,7 @@ static struct json_object *show_thread_status_json(struct thread_stat *ts, } if (opt_list) - json_add_job_opts(root, "job options", opt_list); + json_add_job_opts(root, "job options", opt_list, true); add_ddir_status_json(ts, rs, DDIR_READ, root); add_ddir_status_json(ts, rs, DDIR_WRITE, root); @@ -1642,7 +1644,7 @@ void __show_run_stats(void) json_object_add_value_int(root, "timestamp", time_p); json_object_add_value_string(root, "time", time_buf); global = get_global_options(); - json_add_job_opts(root, "global options", &global->opt_list); + json_add_job_opts(root, "global options", &global->opt_list, false); array = json_create_array(); json_object_add_value_array(root, "jobs", array); }