From e4e3e344abd9df2b9cdf430c51e034b5f98f8f4f Mon Sep 17 00:00:00 2001 From: Vincent Fu Date: Thu, 23 Jun 2016 15:28:25 -0400 Subject: [PATCH 1/1] Change steadystate reporting: 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stat.c b/stat.c index 765c2b20..f51735e7 100644 --- 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); - 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_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); -- 2.25.1