pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: PostgreSQL Developers <pgsql-hackers@postgresql.org>
Subject: Re: pgbench - compute & show latency consistently
Date: Wed, 13 Jul 2016 10:39:34 +0200 (CEST)
Message-ID: <alpine.DEB.2.20.1607131015370.7486@sto> (raw)
In-Reply-To: <dbddbaf3-0e93-044b-93ce-ded8d421f263@2ndquadrant.com>
References: <alpine.DEB.2.20.1607091035530.3412@sto>
	<dbddbaf3-0e93-044b-93ce-ded8d421f263@2ndquadrant.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>


Hello Peter,

>>  number of transactions per client: 1000
>> -latency average = 15.844 ms
>> +latency average: 15.844 ms
>>  tps = 618.764555 (including connections establishing)
>
> I think what you have here is that colons separate input parameters and
> equal signs separate result output.  So I think it's OK the way it is.

Hmmm... Then other measures displayed are not all consistent with this 
theory.

Also there is still the bug under -t which displays a 0 latency.

The attached patch still fixes that and make it consistent the other way 
around, i.e. by using "=" for latency. I switched to use ":" for weight 
which is an input parameter. I let ":" when there is a long sentence to 
describe the figure displayed, more on aesthetical grounds.

> Maybe a better improvement would be introducing section headings like
> "test parameters" and "test results".

This would add more lines to the report, to sure how desirable it is.

-- 
Fabien.

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachments:

pgbench-latency-t-2.patch (text/x-diff, 1.1K) download diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index 87fb006..af1169a 100644 --- a/src/bin/pgbench/pgbench.c +++ b/src/bin/pgbench/pgbench.c @@ -3291,9 +3291,9 @@ printResults(TState *threads, StatsData *total, instr_time total_time, if (throttle_delay || progress || latency_limit) printSimpleStats("latency", &total->latency); else - /* only an average latency computed from the duration is available */ - printf("latency average: %.3f ms\n", - 1000.0 * duration * nclients / total->cnt); + /* no measure, show average latency computed from run time */ + printf("latency average = %.3f ms\n", + 1000.0 * time_include * nclients / total->cnt); if (throttle_delay) { @@ -3319,7 +3319,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,

view thread (9+ messages)  latest in thread

Message-ID: <alpine.DEB.2.20.1607131015370.7486@sto>
Permalink:  ../alpine.DEB.2.20.1607131015370.7486@sto/
Also on:    postgresql.org/message-id/alpine.DEB.2.20.1607131015370.7486@sto

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: coelho@cri.ensmp.fr, peter.eisentraut@2ndquadrant.com
  Subject: Re: pgbench - compute & show latency consistently
  In-Reply-To: <alpine.DEB.2.20.1607131015370.7486@sto>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox