Skip to content

Commit 1990ce1

Browse files
committed
Doc: improve description of pgbench script weights.
Point out the workaround to be used if you want to write a script file name that includes "@". Clean up the text a little. Fabien Coelho, additional wordsmithing by me Discussion: https://postgr.es/m/1c4e81550d214741827a03292222db8d@G08CNEXMBPEKD06.g08.fujitsu.local
1 parent ed6329c commit 1990ce1

File tree

1 file changed

+22
-12
lines changed

1 file changed

+22
-12
lines changed

doc/src/sgml/ref/pgbench.sgml

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -396,15 +396,19 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
396396
<term><option>--builtin</option>=<replaceable>scriptname[@weight]</replaceable></term>
397397
<listitem>
398398
<para>
399-
Add the specified built-in script to the list of executed scripts.
400-
An optional integer weight after <literal>@</literal> allows to adjust the
401-
probability of drawing the script. If not specified, it is set to 1.
399+
Add the specified built-in script to the list of scripts to be executed.
402400
Available built-in scripts are: <literal>tpcb-like</literal>,
403401
<literal>simple-update</literal> and <literal>select-only</literal>.
404402
Unambiguous prefixes of built-in names are accepted.
405-
With special name <literal>list</literal>, show the list of built-in scripts
403+
With the special name <literal>list</literal>, show the list of built-in scripts
406404
and exit immediately.
407405
</para>
406+
<para>
407+
Optionally, write an integer weight after <literal>@</literal> to
408+
adjust the probability of selecting this script versus other ones.
409+
The default weight is 1.
410+
See below for details.
411+
</para>
408412
</listitem>
409413
</varlistentry>
410414

@@ -457,10 +461,16 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
457461
<term><option>--file=</option><replaceable>filename[@weight]</replaceable></term>
458462
<listitem>
459463
<para>
460-
Add a transaction script read from <replaceable>filename</replaceable> to
461-
the list of executed scripts.
462-
An optional integer weight after <literal>@</literal> allows to adjust the
463-
probability of drawing the test.
464+
Add a transaction script read from <replaceable>filename</replaceable>
465+
to the list of scripts to be executed.
466+
</para>
467+
<para>
468+
Optionally, write an integer weight after <literal>@</literal> to
469+
adjust the probability of selecting this script versus other ones.
470+
The default weight is 1.
471+
(To use a script file name that includes an <literal>@</literal>
472+
character, append a weight so that there is no ambiguity, for
473+
example <literal>filen@me@1</literal>.)
464474
See below for details.
465475
</para>
466476
</listitem>
@@ -925,10 +935,10 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
925935
<para>
926936
<application>pgbench</application> executes test scripts chosen randomly
927937
from a specified list.
928-
They include built-in scripts with <option>-b</option> and
929-
user-provided custom scripts with <option>-f</option>.
930-
Each script may be given a relative weight specified after a
931-
<literal>@</literal> so as to change its drawing probability.
938+
The scripts may include built-in scripts specified with <option>-b</option>
939+
and user-provided scripts specified with <option>-f</option>.
940+
Each script may be given a relative weight specified after an
941+
<literal>@</literal> so as to change its selection probability.
932942
The default weight is <literal>1</literal>.
933943
Scripts with a weight of <literal>0</literal> are ignored.
934944
</para>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy