[PATCH] add --throttle option to pgbench - Mailing list pgsql-hackers

From Fabien COELHO
Subject [PATCH] add --throttle option to pgbench
Date
Msg-id alpine.DEB.2.02.1304291411110.24306@localhost6.localdomain6
Whole thread Raw
Responses Re: [PATCH] add --throttle option to pgbench
List pgsql-hackers
Hello,

Please find attached a small patch to add a throttling capability to 
pgbench, that is pgbench aims at a given client transaction rate instead 
of maximizing the load. The throttling relies on Poisson-distributed 
delays inserted after each transaction.

I wanted that to test the impact of various load levels, and for 
functionnal tests on my laptop which should not drain the battery.
 sh> ./pgbench -T 10 -c 2 --throttle 10tps test starting vacuum...end. transaction type: TPC-B (sort of) scaling
factor:1 query mode: simple number of clients: 2 number of threads: 1 duration: 10 s number of transactions actually
processed:214 tps = 21.054216 (including connections establishing) tps = 21.071253 (excluding connections
establishing)

-- 
Fabien.

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: ALTER DEFAULT PRIVILEGES FOR ROLE is broken
Next
From: Merlin Moncure
Date:
Subject: Re: Graph datatype addition