Swann Croiset | 16 Nov 16:16 2012

use startWorkerThread with callable object

Hi,

I start new threads from within grinder script but i can only use a function as testRunner argument of grinder.startWorkerThread(testRunner)

when i try with a callable object, threads start but don't seem execute the "__call__()"  method.

what's wrong to deal with this ?

thanks in advance

i use Grinder 3.11 & jython 2.5.3 & jdk 1.6 from sun

 

---- test case --

from net.grinder.script.Grinder import grinder
from net.grinder.script import Test

log = grinder.logger.info

class myTest:
    def __init__(self, ID, t):
        self.ID = ID
        self.THREADS = t

def fooo():
    grinder.sleep(100)
    log('foo() #%d' % grinder.threadNumber)
    return None
            
test1 = Test(1, "foo")
test1.record(fooo)
                
#def myEjbTester():
#    fooo()

class myEjbTester:
    def __call__(self):
        foo()

class TestRunner:
    def __call__(self):
        tests = [myTest(1, 3), myTest(2, 4)]

        for mytest in tests:
            log("Launch %d threads for test #%d"%(mytest.THREADS, mytest.ID))
            for i in range(0, mytest.THREADS):
                tid = grinder.startWorkerThread(myEjbTester)
                log("lanch test '%d' thread %d / grinder thread #%d" % (mytest.ID, i, tid))
        grinder.stopThisWorkerThread()


--- Swann 06.60.14.64.89
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Janice Meyers | 13 Nov 21:53 2012

Getting "Report to console failed" error

All,

 

I wanted to see if maybe someone out there can maybe help me with this issue.  I am pretty new to The Grinder and I’ve been using it lately to try and produce a large amount of load against one of our cache servers by having a test that does a single http GET on a 1KB file.  I have tried different combinations of worker processes/worker threads to try and produce this load.  We have 9 agents setup (all on separate Dell 1950 servers with 16GB of RAM).  These agents all report back to our console installed on a VM.  So far I have only been able to get up to about 23,000 mean TPS (using 2 workers/50-60 threads or 3 workers/50-60 threads, etc) but need to produce a lot more load than that.  However, when I try to increase the number of worker processes and/or threads to try and produce more load, my agents start throwing the following error “Report to console failed…” (see below).  Is there a limitation to how many agents can report back to the console?  Or any suggestions/ideas on tuning The Grinder or my environment to be able to produce more load and not get these errors?

 

Any help would be much appreciated.

 

Thanks in advance,

Janice

 

Error I’m seeing:

 

Report to console failed
net.grinder.communication.CommunicationException: Exception whilst sending message
   at net.grinder.communication.AbstractSender.send(AbstractSender.java:57) ~[grinder-core-3.10.jar:na]
   at net.grinder.communication.QueuedSenderDecorator.flush(QueuedSenderDecorator.java:60) ~[grinder-core-3.10.jar:na]
   at net.grinder.engine.process.GrinderProcess.sendStatusMessage(GrinderProcess.java:606) ~[grinder-core-3.10.jar:na]
   at net.grinder.engine.process.GrinderProcess.access$1100(GrinderProcess.java:108) ~[grinder-core-3.10.jar:na]
   at net.grinder.engine.process.GrinderProcess$ReportToConsoleTimerTask.run(GrinderProcess.java:583) ~[grinder-core-3.10.jar:na]
   at java.util.TimerThread.mainLoop(Timer.java:534) [na:1.6.0_24]
   at java.util.TimerThread.run(Timer.java:484) [na:1.6.0_24]
Caused by: java.net.SocketException: Broken pipe
   at java.net.SocketOutputStream.socketWrite0(Native Method) ~[na:1.6.0_24]
   at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109) ~[na:1.6.0_24]
   at java.net.SocketOutputStream.write(SocketOutputStream.java:153) ~[na:1.6.0_24]
   at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) ~[na:1.6.0_24]
   at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) ~[na:1.6.0_24]
   at java.io.ObjectOutputStream$BlockDataOutputStream.flush(ObjectOutputStream.java:1803) ~[na:1.6.0_24]
   at java.io.ObjectOutputStream.flush(ObjectOutputStream.java:715) ~[na:1.6.0_24]
   at net.grinder.communication.AbstractSender.writeMessageToStream(AbstractSender.java:90) ~[grinder-core-3.10.jar:na]
   at net.grinder.communication.StreamSender.writeMessage(StreamSender.java:70) ~[grinder-core-3.10.jar:na]
   at net.grinder.communication.AbstractSender.send(AbstractSender.java:53) ~[grinder-core-3.10.jar:na]
   ... 6 common frames omitted
2012-11-13 15:04:56,197 INFO  agent: forcibly terminating unresponsive processes

 

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Ravi Joshi | 12 Nov 18:54 2012
Picon

Configure Grinder to use differen-2 kinds of loads like spike load, random load

How can I configure Grinder to use differen-2 kinds of loads like spike load, random load etc. instead of presently available simple load?

-
Thanks
Ravi
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Ravi Joshi | 12 Nov 12:32 2012
Picon

Custom Console for getting signal after all the agents have finished script execution

I am writing custom console but stuck in the middle. How can console know, once all of the agents are finished the script execution? Since agentProcessStatus.getState(); is never going in FINISHED state, do I need to look over all the worker process states periodically i.e. workerProcessStatuses[0].getState(); ? I need to design a Process State Listener, which can tell that all the agents are finished and waiting for new console signal.

 

-

Thanks

Ravi

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
mgazda | 9 Nov 11:16 2012

Driver machine specs for large test?


I'm working on a large web site for a European multinational.  In a couple of
months we will need to run a large scale test which will have a total of
15,000 concurrent threads across multiple load driver systems which should
drive 5Gbps traffic total.  There will be approximately 1800 tests which
each thread will run.  Each thread will execute for approximately 40
minutes.  We are in the process of determining the driver machine
specification as we will be using either physical systems or VMs from a
hosting service (we won't need the capacity long term so we won't buy
systems).

Currently, I'm looking at using 6 VM's on Linux with 16GB Ram, 4 Virtual
CPUs, and dedicated 1Gbps Network Connections.  This is very preliminary and
is an educated guess at this stage.

I know this is highly dependent upon the actual tests and how we scale
processes and threads per process and grinder jvm, but I'm wondering if
anyone can offer some general insight or thoughts on this based on past
experience.

Thanks for your help.

--

-- 
View this message in context: http://old.nabble.com/Driver-machine-specs-for-large-test--tp34659922p34659922.html
Sent from the Grinder - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
Philip Aston | 9 Nov 08:24 2012
Picon

Re: Two problems with grinder


In future, please send a separate message for each problem. It makes it easier to track subsequent discussion.


On 09/11/12 00:52, FMehran-Ak89OhzjgG8@public.gmane.org wrote:
<!-- /* Font Definitions */ <at> font-face {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0;} <at> font-face {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0;} <at> font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} <at> font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri","sans-serif"; color:black;} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} p.MsoAcetate, li.MsoAcetate, div.MsoAcetate {mso-style-priority:99; mso-style-link:"Balloon Text Char"; margin:0in; margin-bottom:.0001pt; font-size:8.0pt; font-family:"Tahoma","sans-serif"; color:black;} p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {mso-style-priority:34; margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.5in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri","sans-serif"; color:black;} span.BalloonTextChar {mso-style-name:"Balloon Text Char"; mso-style-priority:99; mso-style-link:"Balloon Text"; font-family:"Tahoma","sans-serif";} span.EmailStyle19 {mso-style-type:personal; font-family:"Calibri","sans-serif"; color:windowtext;} span.EmailStyle20 {mso-style-type:personal-reply; font-family:"Calibri","sans-serif"; color:#1F497D;} .MsoChpDefault {mso-style-type:export-only; font-size:10.0pt;} <at> page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;} div.WordSection1 {page:WordSection1;} /* List Definitions */ <at> list l0 {mso-list-id:400102396; mso-list-type:hybrid; mso-list-template-ids:-86369108 1417685500 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} <at> list l0:level1 {mso-level-text:%1-; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in;} <at> list l1 {mso-list-id:1104181242; mso-list-type:hybrid; mso-list-template-ids:-72345206 -1825402846 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} <at> list l1:level1 {mso-level-text:%1-; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in;} ol {margin-bottom:0in;} ul {margin-bottom:0in;} -->
I recorded a script.  The first time I saw a lot more objects being loaded in the script when I brought a page up  and they all got recorded.

So when I parameterized the script and ran a performance test simulating 10 users (each 100 run), there was a slow

Response because of all the browser’s requests and objects

 

Later on, I recorded the same transaction and same page and there were less objects and less pages  and less requests and tests

Recorded.  What could it be?  I know I did flush all prior to  2nd recording.  Could it be that those object were in the memory

And got recorded in the first recording?


Its hard to say without knowing the application. The TCPProxy reflects the interaction between the browser and the server, it doesn't cache any information itself. I suspect that you didn't clear your browser cache before the second recording.


Also, I have never done two agents.  I installed grinder on another machine and modified the property file to include the following:

...

 

 

 

I double click on the agent, and it goes away. I captured the screenshot before it goes away.  Do you know what the problem is.    I don’t have any problem with  the default first

Agent which uses the default port and the machine same as console.



Start a terminal ("cmd") window. Change to the C:\grinder directory. Run "setGrinderEnv.cmd", then try "java -cp %CLASSPATH%  -Dgrinder.jvm.arguments=-Dpython.home=C:\Grinder\jython2.2.1 net.grinder.Grinder %GRINDERPROPERTIES%".

You'll be able to see the output of the agent in the terminal.

You will probably discover that there is some problem connecting to the remote server. Perhaps a firewall is in the way? Or maybe the console is not listening on the 10.128.15.89 address?

- Phil

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Ravi Joshi | 8 Nov 12:27 2012
Picon

Unable to get the src of Grinder 3.11 from Git repo

I am unable to get the source of Grinder 3.11 using Git repo at git clone http://git.code.sf.net/p/grinder/code grinder-code  and git clone git://git.code.sf.net/p/grinder/code grinder-code. I am getting no such file or directory error.

 

Can somebody provide the zip file location of Grinder 3.11 src?

 

-

Thanks

Ravi

 

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Ravi Joshi | 7 Nov 14:00 2012
Picon

Is there any non GUI way to run console?

Hi,

 

Is there any non GUI way to run console? Or do I need to redesign the console in Java? I looked over javadoc of Grinder. The class net.grinder.Console extends AbstractMainClass is the entry point of The Grinder console. After having a look on source, I concluded to extend AbstractMainClass to my custom class. But I am trapped in the middle. I want my custom class to have methods for starting, stopping, resting processes and one method to know that all agents are connected successfully to console, so that I can invoke start processes method.

 

Can somebody just give me brief information and implementation about the console methods and extending AbstractMainClass class? Is there any other class needs to be inherit for designing non GUI console having methods for starting, stopping, resting processes and one method to know that all agents are connected successfully to console?

 

-

Thanks and regards

Ravi

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Di Wu | 6 Nov 16:44 2012

How Redirect Works - Javascript involved

Hi all,

 

I am struggling with an issue related to redirecting and/or javascript.

 

Currently I need to test a website which has OWASP CSRFGuard implemented. By the help of Firebug, I could see that the browser actually does 1 POST and 4 GET requests to land on the final page. The first POST call is a ‘login’. The final page is a dashboard page, where I could fetch the token that OWASP generated and reuse the token for other requests. But when I use the following code to request ‘login’. It doesn’t bring me the final page.

 

result = HTTPRequest (url).POST(page,params,headers)

 

Instead, it gives a landing page of OWASP CSRFGuard, looks like this. I presume it is because python doesn’t support javascript?

 

<html>

<head>

<title>OWASP CSRFGuard Project - New Token Landing Page</title>

</head>

<body>

<script type="text/javascript">

var form = document.createElement("form");

form.setAttribute("method", "post");

form.setAttribute("action", "/index.jsp");

document.body.appendChild(form);

form.submit();

</script>

</body>

</html>

 

 

Please help. I need your experience. Thanks.

 

Regards,

Di


Di Wu

Performance Test Lead

Net Entertainment NE AB, Luntmakargatan 18, SE-111 37, Stockholm, SE
T: +46 709 124 638, M: +46 709 124 638, F: +46 8 578 545 10
Di.Wu-t8tZw7lvOmjQT0dZR+AlfA@public.gmane.org www.netent.com

Better Games



This email and the information it contains are confidential and may be legally privileged and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify me immediately. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. You should not copy it for any purpose, or disclose its contents to any other person. Internet communications are not secure and, therefore, Net Entertainment does not accept legal responsibility for the contents of this message as it has been transmitted over a public network. If you suspect the message may have been intercepted or amended please call me. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. Thank you.

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
matthias.dillier | 5 Nov 16:07 2012
Picon

Bug in helloworld.py

Hi all

In grinder 3.11, there is a bug in the helloworld.py:

Line 31 is
        test1("Hello World")
instead of
        log("Hello World")

In the UsersGuide, there are also bug like this in the beginning of the 
script part.

Regards
Matthias
___________________________________________________________________

Matthias Dillier IAAG
Informatiker
CSS Versicherung
Tribschenstrasse 21 / Postfach 2568
CH-6002 Luzern
Telefon ++41 (0)58 277 12 43
Telefax ++41 (0)58 277 12 12
matthias.dillier@...
www.css.ch
___________________________________________________________________

CSS Kranken-Versicherung AG, CSS Versicherung AG,
INTRAS Kranken-Versicherung AG, INTRAS Versicherung AG,
Arcosana AG 

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
Kelvin Ward | 1 Nov 13:15 2012

MavenJython Plugin and Grinder

Hi

I’m trying to use the maven/jython tooling at http://mavenjython.sourceforge.net/. The MavenJython packaging allows one to use maven to fetch and version java and python libraries – e.g. pulling in jars from maven central and python libraries from pypi or whatever respository you use. A jython installation, its standard libraries as well as the java and jython libraries specified in the maven pom file can be built into one uberjar – jar with dependencies.

I’ve tried doing this using grinder as the main class of the uberjar by specifying net.grinder.Grinder as the mainClass used by the maven-assembly-plugin. The jar is built with ’mvn package’ and we have in the same folder something like:

grinder.properties

grinder.py

my-uberjar-with-dependencies.jar

There are not any python/java source files of interest in the pom project – this is just a skeleton test, but it does pull in an external python library as part of this test.

We then try to run it (a trivial http GET test), which produces an error in the log file:

java –jar my-uberjar-with-dependencies.jar

 

2012-10-31 11:12:07,103 INFO  HAM12763-0 : The Grinder version 3.11

2012-10-31 11:12:07,106 INFO  HAM12763-0 : Java(TM) SE Runtime Environment 1.6.0_29-b11: Java HotSpot(TM) 64-Bit Server VM (20.4-b02, mixed mode) on Windows 7 amd64 6.1

2012-10-31 11:12:07,108 INFO  HAM12763-0 : time zone is GMT (+0000)

2012-10-31 11:12:07,129 INFO  HAM12763-0 : Java VM does not support instrumentation, DCR unavailable

2012-10-31 11:12:07,144 INFO  HAM12763-0 : worker process 0

2012-10-31 11:12:07,151 INFO  HAM12763-0 : instrumentation agents: NO INSTRUMENTER COULD BE LOADED

2012-10-31 11:12:08,811 INFO  HAM12763-0 : registered plug-in net.grinder.plugin.http.HTTPPlugin

2012-10-31 11:12:08,825 ERROR HAM12763-0 : aborting process - Java exception initialising test script

 

Now I think this is because in the normal grinder distribution the standalone grinder-dcr-agent.jar is clearly not packaged within an uberjar and has a special manifest with:

Premain-Class: net.grinder.util.weave.agent.ExposeInstrumentation

Can-Redefine-Classes: true

Can-Retransform-Classes: true

Adding this to the pom didn't help:

build/plugin/configuration/archive ->

<manifestEntries>
  <Premain-Class>net.grinder.util.weave.agent.ExposeInstrumentation</Premain-Class>
  <Can-Redefine-Classes>true</Can-Redefine-Classes>
  <Can-Retransform-Classes>true</Can-Retransform-Classes>
</manifestEntries>

Is it possible to get Grinder working from within an uberjar?

I’ve attached pom.xml based off the demo project at mavenjython.sourceforge, grinder script, properties and the log file.

 

Thanks,

Kelvin Ward.



Attachment (pom.xml): text/xml, 2682 bytes
Attachment (grinder.properties): application/octet-stream, 235 bytes
Attachment (grinder_localhost_http.py): application/octet-stream, 915 bytes
Attachment (HAM12763-0.log): application/octet-stream, 6018 bytes
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use

Gmane