Re: grinder JDBC parallel threads test
Olivier <[email protected]> Mon, 24 Nov 2014 19:47:35 +0100
| Newsgroups | gmane.comp.java.grinder.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, Use a modulo 25 on grinder.threadNumber to spread treatment Olivier -----Message d'origine----- De : "Gang Yan" <[email protected]> Envoyé : 24/11/2014 11:18 À : "grinder-use" <[email protected]> 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 [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