Re: PATCH: pgbench - random sampling of transaction written into log - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: PATCH: pgbench - random sampling of transaction written into log
Date
Msg-id e7ec54867a2cfecb2876d71621aa80d9@fuzzy.cz
Whole thread Raw
In response to Re: PATCH: pgbench - random sampling of transaction written into log  ("Tomas Vondra" <tv@fuzzy.cz>)
Responses Re: PATCH: pgbench - random sampling of transaction written into log
List pgsql-hackers
Dne 31.08.2012 00:01, Tomas Vondra napsal:
> On 30 Srpen 2012, 23:44, Robert Haas wrote:
>> On Thu, Aug 30, 2012 at 3:48 PM, Tomas Vondra <tv@fuzzy.cz> wrote:
>>> That sounds like a pretty trivial patch. I've been thinking about
>>> yet
>>> another option - histograms (regular or with exponential bins).
>>
>> I thought about that, too, but I think high-outliers is a lot more
>> useful.  At least for the kinds of things I worry about.
>
> OK, let's fix the current patches first. We can add more options
> later.

So, here is a fixed version of the patch. I've made these changes:

1) The option is now '--sampling-rate' instead of '-R' and accepts
float arguments. I've decided not to use 0.01 = 1% but use 1 = 1%, so it
accepts values between 0 and 100. I find this more natural.

2) I've removed one of the two new variables, the remaining one is used
both to check whether the sampling is enabled and keep the value.

3) I've decided not to enable "-l" whenever the "--sampling-rate" is
used. Again, I find this a bit less magic behavior.

4) I've fixed some formatting issues - if you notice another one that I
don't see, let me know.

Tomas
Attachment

pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: Fwd: [PERFORM] Loose Index Scans by Planner?
Next
From: Tomas Vondra
Date:
Subject: Re: PATCH: pgbench - aggregation of info written into log