It's not demonstrably slower than 2.5 either. (1.1 is measurably slower; probably not by enough for anyone to care, but 1.5 is good enough for me.)Good if it fails quick enough for you.
Attached a patch with the zipf doc update & the TAP test parameter change. -- Fabien.
diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml index 15ee7c0f2b..10285d655b 100644 --- a/doc/src/sgml/ref/pgbench.sgml +++ b/doc/src/sgml/ref/pgbench.sgml @@ -1613,6 +1613,14 @@ f(x) = PHI(2.0 * parameter * (x - mu) / (max - min + 1)) / frequently values to the beginning of the interval are drawn. The closer to 0 <replaceable>parameter</replaceable> is, the flatter (more uniform) the access distribution. + The distribution is such that, assuming the range starts from 1, + the ratio of probability of drawing <replaceable>k</replaceable> versus + drawing <replaceable>k+1</replaceable> is + <literal>((<replaceable>k</replaceable>+1)/<replaceable>k</replaceable>)**<replaceable>parameter</replaceable></literal>. + For instance <literal>random_zipfian(1, ..., 2.5)</literal> draws + value <literal>1</literal> about <literal>(2/1)**2.5 = 5.66</literal> times more frequently + than <literal>2</literal>, which itself is drawn <literal>(3/2)*2.5 = 2.76</literal> times more + frequently than <literal>3</literal>, and so on. </para> </listitem> </itemizedlist> diff --git a/src/bin/pgbench/t/001_pgbench_with_server.pl b/src/bin/pgbench/t/001_pgbench_with_server.pl index c87748086a..c0cdfbf5f7 100644 --- a/src/bin/pgbench/t/001_pgbench_with_server.pl +++ b/src/bin/pgbench/t/001_pgbench_with_server.pl @@ -471,7 +471,7 @@ for my $i (1, 2) \set ur random(1000, 1999) \set er random_exponential(2000, 2999, 2.0) \set gr random_gaussian(3000, 3999, 3.0) -\set zr random_zipfian(4000, 4999, 2.5) +\set zr random_zipfian(4000, 4999, 1.5) INSERT INTO seeded_random(seed, rand, val) VALUES (:random_seed, 'uniform', :ur), (:random_seed, 'exponential', :er),