Re: pgbench stats per script & other stuff

Josh Berkus <josh@agliodbs.com>

From: Josh Berkus <josh@agliodbs.com>
To: Fabien COELHO <coelho@cri.ensmp.fr>, Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2015-07-22T00:02:44Z
Lists: pgsql-hackers
On 07/21/2015 09:29 AM, Fabien COELHO wrote:
> Maybe -f file.sql:weight (yuk from my point of view, but it can be done
> easily).

Maybe it's past time for pgbench to have a config file?

Given that we want to define some per-workload options, the config file
would probably need to be YAML or JSON, e.g.:

pgbench --config=workload1.pgb

workload1.pgb
-------------

database: bench
port: 5432
host: localhost
user: josh
clients : 16
threads : 4
response-times : on
stats-level: script
script1:
	file: script1.bench
	weight: 3
script2:
	file: script2.bench
	weight: 1
	
the above would execute a pgbench with 16 clients, 4 threads, "script1"
three times as often as script2, and report stats at the script (rather
than SQL statement) level.




-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


Commits

  1. pgbench: Allow changing weights for scripts