Change steadystate reporting:
authorVincent Fu <Vincent.Fu@sandisk.com>
Thu, 23 Jun 2016 19:28:25 +0000 (15:28 -0400)
committerJens Axboe <axboe@fb.com>
Mon, 15 Aug 2016 15:44:52 +0000 (09:44 -0600)
1. Remove superfluous member 'limit'
2. Report criterion as (maximum deviation / mean) or (slope / mean) when the limit is specified as a percentage

stat.c

diff --git a/stat.c b/stat.c
index 765c2b20249b8588d438e357c33f5165e02b2666..f51735e7dc4b4d84462541c7b97dcf451a98edac 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -1271,11 +1271,10 @@ static struct json_object *show_thread_status_json(struct thread_stat *ts,
                tmp = json_create_object();
                json_object_add_value_object(root, "steadystate", tmp);
                json_object_add_value_string(tmp, "ss", ss_option);
                tmp = json_create_object();
                json_object_add_value_object(root, "steadystate", tmp);
                json_object_add_value_string(tmp, "ss", ss_option);
-               json_object_add_value_float(tmp, "limit", (float)ss->limit);
                json_object_add_value_int(tmp, "duration", (int)ss->dur);
                json_object_add_value_int(tmp, "steadystate_ramptime", ss->ramp_time / 1000000L);
                json_object_add_value_int(tmp, "attained", ss->attained);
                json_object_add_value_int(tmp, "duration", (int)ss->dur);
                json_object_add_value_int(tmp, "steadystate_ramptime", ss->ramp_time / 1000000L);
                json_object_add_value_int(tmp, "attained", ss->attained);
-               json_object_add_value_float(tmp, "criterion", ss->criterion);
+               json_object_add_value_float(tmp, "criterion", ss->pct ? ss->criterion / 100 : ss->criterion);
 
                cache = json_create_array();
                json_object_add_value_array(tmp, "data", cache);
 
                cache = json_create_array();
                json_object_add_value_array(tmp, "data", cache);