From 8bea3d2219844887e170471f223ba100b3c17571 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Wed, 27 Jan 2016 02:54:22 +0100 Subject: [PATCH] pgbench: improve multi-script support MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Previously, it was possible to specify one or several custom scripts to run, or only one of the builtin scripts. With this patch it is also possible to specify to run the builtin scripts multiple times, using the new -b option. Also, unify the code for both cases; this eases future pgbench improvements. Author: Fabien Coelho Review: Michaël Paquier, Álvaro Herrera --- doc/src/sgml/ref/pgbench.sgml | 74 +++++--- src/bin/pgbench/pgbench.c | 333 +++++++++++++++++++++------------- 2 files changed, 253 insertions(+), 154 deletions(-) diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml index 541d17b82a..42d0667180 100644 --- a/doc/src/sgml/ref/pgbench.sgml +++ b/doc/src/sgml/ref/pgbench.sgml @@ -48,7 +48,7 @@ Typical output from pgbench looks like: -transaction type: TPC-B (sort of) +transaction type: <builtin: TPC-B (sort of)> scaling factor: 10 query mode: simple number of clients: 10 @@ -261,6 +261,20 @@ pgbench options dbname benchmarking arguments: + + + + + + Add the specified builtin script to the list of executed scripts. + Available builtin scripts are: tpcb-like, + simple-update and select-only. + With special name list, show the list of builtin scripts + and exit immediately. + + + + clients @@ -307,14 +321,13 @@ pgbench options dbname - filename - filename + + - Read transaction script from filename. + Add a transaction script read from filename to + the list of executed scripts. See below for details. - , , and - are mutually exclusive. @@ -404,10 +417,8 @@ pgbench options dbname - Do not update pgbench_tellers and - pgbench_branches. - This will avoid update contention on these tables, but - it makes the test case even less like TPC-B. + Run builtin simple-update script. + Shorthand for @@ -512,9 +523,9 @@ pgbench options dbname Report the specified scale factor in pgbench's output. With the built-in tests, this is not necessary; the correct scale factor will be detected by counting the number of - rows in the pgbench_branches table. However, when testing - custom benchmarks (