Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3989fda

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 ba04ced commit 3989fda

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
@@ -346,15 +346,19 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
346346
<term><option>--builtin</option>=<replaceable>scriptname[@weight]</replaceable></term>
347347
<listitem>
348348
<para>
349-
Add the specified built-in script to the list of executed scripts.
350-
An optional integer weight after <literal>@</literal> allows to adjust the
351-
probability of drawing the script. If not specified, it is set to 1.
349+
Add the specified built-in script to the list of scripts to be executed.
352350
Available built-in scripts are: <literal>tpcb-like</literal>,
353351
<literal>simple-update</literal> and <literal>select-only</literal>.
354352
Unambiguous prefixes of built-in names are accepted.
355-
With special name <literal>list</literal>, show the list of built-in scripts
353+
With the special name <literal>list</literal>, show the list of built-in scripts
356354
and exit immediately.
357355
</para>
356+
<para>
357+
Optionally, write an integer weight after <literal>@</literal> to
358+
adjust the probability of selecting this script versus other ones.
359+
The default weight is 1.
360+
See below for details.
361+
</para>
358362
</listitem>
359363
</varlistentry>
360364

@@ -408,10 +412,16 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
408412
<term><option>--file=</option><replaceable>filename[@weight]</replaceable></term>
409413
<listitem>
410414
<para>
411-
Add a transaction script read from <replaceable>filename</replaceable> to
412-
the list of executed scripts.
413-
An optional integer weight after <literal>@</literal> allows to adjust the
414-
probability of drawing the test.
415+
Add a transaction script read from <replaceable>filename</replaceable>
416+
to the list of scripts to be executed.
417+
</para>
418+
<para>
419+
Optionally, write an integer weight after <literal>@</literal> to
420+
adjust the probability of selecting this script versus other ones.
421+
The default weight is 1.
422+
(To use a script file name that includes an <literal>@</literal>
423+
character, append a weight so that there is no ambiguity, for
424+
example <literal>filen@me@1</literal>.)
415425
See below for details.
416426
</para>
417427
</listitem>
@@ -859,10 +869,10 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
859869
<para>
860870
<application>pgbench</application> executes test scripts chosen randomly
861871
from a specified list.
862-
They include built-in scripts with <option>-b</option> and
863-
user-provided custom scripts with <option>-f</option>.
864-
Each script may be given a relative weight specified after a
865-
<literal>@</literal> so as to change its drawing probability.
872+
The scripts may include built-in scripts specified with <option>-b</option>
873+
and user-provided scripts specified with <option>-f</option>.
874+
Each script may be given a relative weight specified after an
875+
<literal>@</literal> so as to change its selection probability.
866876
The default weight is <literal>1</literal>.
867877
Scripts with a weight of <literal>0</literal> are ignored.
868878
</para>

0 commit comments

Comments
 (0)