diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2016-09-21 13:24:13 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2016-09-21 13:24:13 +0300 |
commit | 2a7f4f76434d82eb0d1b5f4f7051043e1dd3ee1a (patch) | |
tree | 5c807aba3fa302001fb0c793bc28c06ab308b8b8 /src | |
parent | 65c65563842cc99fb1c349211581a62dc728eee2 (diff) | |
download | postgresql-2a7f4f76434d82eb0d1b5f4f7051043e1dd3ee1a.tar.gz postgresql-2a7f4f76434d82eb0d1b5f4f7051043e1dd3ee1a.zip |
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: <alpine.DEB.2.20.1607131015370.7486@sto>
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pgbench/pgbench.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index 9033ff2caae..8b24ad50e7a 100644 --- a/src/bin/pgbench/pgbench.c +++ b/src/bin/pgbench/pgbench.c @@ -3260,6 +3260,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); @@ -3298,7 +3299,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); } @@ -3326,7 +3327,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, |