Re: Running Multiple Scripts Concurrently Using Grinder
Gary Mulder <[email protected]> Sat, 27 Jun 2015 11:52:43 +0100
| Newsgroups | gmane.comp.java.grinder.user |
|---|---|
| Message-ID | <CAKy9zTA6CA28gNvFAwTh81WyZDjf-pT3Foy6JwC3bNUNg43nxg@mail.gmail.com> |
It's arbitrary On 26 Jun 2015 22:47, "Christine Economy" <[email protected]> wrote: > > Thanks, Gary! This is tremendously helpful now and also going forward working with Grinder. > Thanks again - and for being willing to share your knowledge. I always check > Amazon for books on any new tech areas I venture into. Didn't see one for The Grinder. > Have you ever considered writing one? Philip was one of the original authors of The Grinder and still is semi-active with the project and on this list. http://www.amazon.com/J2ee-Performance-Testing-Peter-Zadrozny/dp/159059181X > > > I do have one potentially dumb question I'd like to ask you about the parallel > script: where is the value of 4 coming from? Why 4 in this case? It is arbitrarily chosen in the sample, so yes it is a dumb number. Any conditional logic that decides what tests to run as a function of the Grinder thread id could be used. e.g. assuming you had a list of test class scripts testScript1.py, testScript2.py, testScript3.py create a Dict: scaleFactor = 2.0 scenario = {'testScript1' : 01 * scaleFactor, 'testScript2' : 05 * scaleFactor, 'testScript3' : 10 * scaleFactor} for script in scenario.keys(): exec("import %s" % script) Then every Grinder thread created uses its thread id to determine which of the above should be executed to implement the scenario. The scaleFactor allows you to simply scale the load before the test starts, not during. You'll need to look at the other samples to see how to delay the start of the _call_() method to simulate you load scenario (ramp-up, down, etc). Its a bit more programmatic than LoadRunner, but allows much better fine control of execution and monitoring. Gary ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ grinder-use mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/grinder-use