Re: pgbench stats per script & other stuff
Michael Paquier <michael.paquier@gmail.com>
From: Michael Paquier <michael.paquier@gmail.com>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2016-02-01T07:29:09Z
Lists: pgsql-hackers
On Fri, Jan 29, 2016 at 11:28 PM, Fabien COELHO <coelho@cri.ensmp.fr> wrote: > Here is a rebase of the 3 remaining parts: > - 15-c: per script stats > - 15-d: weighted scripts > - 15-e: prefix selection for -b Regarding patch d. + /* compute total_weight */ + for (i = 0; i < num_scripts; i++) + total_weight += sql_script[i].weight; total_weight can overflow :) I don't think that's worth worrying, I am just noticing that. + The provided <replaceable>scriptname</> needs only be an unambiguous + prefix of the builtin name, hence <literal>si</> would be enough to + select <literal>simple-update</>. [...] - if (strncmp(builtin_script[i].name, name, - strlen(builtin_script[i].name)) == 0) + if (strncmp(builtin_script[i].name, name, len) == 0) I agree with Alvaro here: this should remain unchanged. It seems to be a rebase mistake. -- Michael
Commits
-
pgbench: Allow changing weights for scripts
- 7bafffea647e 9.6.0 landed