From: | KONDO Mitsumasa <kondo(dot)mitsumasa(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: gaussian distribution pgbench |
Date: | 2014-03-07 07:02:15 |
Message-ID: | 53196EF7.8060006@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
(2014/03/04 17:42), KONDO Mitsumasa wrote:> (2014/03/04 17:28), Fabien COELHO wrote:
>>> OK. I'm not sure which idia is the best. So I wait for comments in community:)
>> Hmmm. Maybe you can do what Tom voted for, he is the committer:-)
> Yeah, but he might change his mind by our disscuttion. So I wait untill tomorrow,
> and if nothing to comment, I will start to fix what Tom voted for.
I create the patch which is fixed UI. If we agree with this interface,
I also start to fix the document.
New "\setrandom" interface is here.
\setrandom var min max [gaussian threshold | exponential threshold]
Attached patch realizes this interface, but it has little bit ugly codeing in
executeStatement() and process_commands().. That is under following.
if(argc == 4)
{
... /* uniform */
}
else if (argv[4]== gaussian or exponential)
{
... /* gaussian or exponential */
}
else
{
... /* uniform with extra argments */
}
It is beacause pgbench custom script allows extra comments or extra argument in
its file. For example, under following cases are no problem case.
\setrandom var min max #hoge --> uniform random
\setrandom var min max #hoge1 #hoge2 --> uniform random
\setrandom var min max gaussian threshold #hoge -->gaussian random
And other cases are classified under following.
\setrandom var min max gaussian #hoge --> uniform
\setrandom var min max max2 gaussian threshold --> uniform
\setrandom var min gaussian #hoge --> ERROR
However, if we wrong grammer in pgbench custom script,
pgbench outputs error log on user terminal. So I think it is especially no problem.
What do you think?
Regards,
--
Mitsumasa KONDO
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
gaussian_and_exponential_pgbench_v10b.patch | text/x-diff | 23.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | KONDO Mitsumasa | 2014-03-07 07:08:13 | Re: gaussian distribution pgbench |
Previous Message | Michael Paquier | 2014-03-07 06:24:56 | syslog_ident mentioned as syslog_identify in the docs |