grinder JDBC parallel threads test
Gang Yan <[email protected]> Mon, 24 Nov 2014 02:14:12 -0800 (PST)
| Newsgroups | gmane.comp.java.grinder.user |
|---|---|
| Message-ID | <43478bc7-70b0-4ee7-a938-6b9beaccda64@default> |
Hi All:
I have question about parallel threads test JDBC driver. Such as:
I set 50 threads for parallel threads test JDBC driver. 25 threads run Database query, 25 threads run Database insert.
Such as:
class TestRunner:
def __call__(self):
connection = None
insertStatement = None
queryStatement = None
try:
connection = getConnection()
insertStatement = connection.createStatement()
test1.record(insertStatement)
insertStatement.execute("insert into grinder_fun values(%d, %d)" %
(grinder.threadNumber, grinder.runNumber))
test2.record(queryStatement)
queryStatement.execute("select * from grinder_fun where thread=%d" %
grinder.threadNumber)
Thanks!
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk