From: Heikki Linnakangas Date: Wed, 21 Sep 2016 10:24:13 +0000 (+0300) Subject: Print test parameters like "foo: 123", and results like "foo = 123". X-Git-Tag: REL9_6_0~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=970300faae189c38fbe393dfab1e326fb75c9a49;p=postgresql Print test parameters like "foo: 123", and results like "foo = 123". The way "latency average" was printed was differently if it was calculated from the overall run time or was measured on a per-transaction basis. Also, the per-script weight is a test parameter, rather than a result, so use the "weight: %f" style for that. Backpatch to 9.6, since the inconsistency on "latency average" was introduced there. Fabien Coelho Discussion: --- diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index 254ca95f3d..531671a00b 100644 --- a/src/bin/pgbench/pgbench.c +++ b/src/bin/pgbench/pgbench.c @@ -3257,6 +3257,7 @@ printResults(TState *threads, StatsData *total, instr_time total_time, tps_exclude = total->cnt / (time_include - (INSTR_TIME_GET_DOUBLE(conn_total_time) / nclients)); + /* Report test parameters. */ printf("transaction type: %s\n", num_scripts == 1 ? sql_script[0].desc : "multiple scripts"); printf("scaling factor: %d\n", scale); @@ -3295,7 +3296,7 @@ printResults(TState *threads, StatsData *total, instr_time total_time, else { /* no measurement, show average latency computed from run time */ - printf("latency average: %.3f ms\n", + printf("latency average = %.3f ms\n", 1000.0 * time_include * nclients / total->cnt); } @@ -3323,7 +3324,7 @@ printResults(TState *threads, StatsData *total, instr_time total_time, { if (num_scripts > 1) printf("SQL script %d: %s\n" - " - weight = %d (targets %.1f%% of total)\n" + " - weight: %d (targets %.1f%% of total)\n" " - " INT64_FORMAT " transactions (%.1f%% of total, tps = %f)\n", i + 1, sql_script[i].desc, sql_script[i].weight,