Re: grinder JDBC parallel threads test
Gang Yan <[email protected]> Mon, 24 Nov 2014 18:48:20 -0800 (PST)
| Newsgroups | gmane.comp.java.grinder.user |
|---|---|
| Message-ID | <3e1ba2f1-fb1b-4169-8bfa-4e2125b8d45e@default> |
Hi Olivier Can you give sample ? Thanks! From: Olivier [mailto:[email protected]] Sent: 2014年11月25日 2:48 To: grinder-use Subject: Re: [Grinder-use] grinder JDBC parallel threads test Hi, Use a modulo 25 on grinder.threadNumber to spread treatment Olivier _____ De : HYPERLINK "mailto:[email protected]"Gang Yan Envoyé : 24/11/2014 11:18 À : HYPERLINK "mailto:[email protected]"grinder-use Objet : [Grinder-use] grinder JDBC parallel threads test 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 _______________________________________________ grinder-use mailing list HYPERLINK "mailto:[email protected]"[email protected] https://lists.sourceforge.net/lists/listinfo/grinder-use ------------------------------------------------------------------------------ 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 _______________________________________________ grinder-use mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/grinder-use