Andreas Niemeyer | 1 Dec 2005 15:24
Favicon

Threadcontrol about the Console with def __del__(self) fails

Hi,

we want to use the Grinder Console for control the runs.

It might be a problem to terminate the threads gracefully - if the 
worker received a stopped message from the console, the `__del__' method 
isn't launched for each thread.

For testing a J2EE application where no session data should remains 
after a test is stopped,  it would be fine to perform a logout if logon, 
see snippets below.

Version Grinder 3, beta 27

Thank you in advance,
Andreas

        def __del__(self):

                 if self.vLoggedIn == 'true':

                         gLogger("do logout due program interrupted", 
gOutCh)
                         gLogger("do logout due program interrupted", 
gOutTermCh)

                         tests[74].GET('/abc/logoff.do')
                         tests[75].GET('/abc/Out.jsp')

	
(Continue reading)

Philip Aston | 1 Dec 2005 20:18

RE: Threadcontrol about the Console with def __del__(self) fails


What you want to do should work.

The current implementation signals each thread. Each thread detects the stop event and shuts down, this
including running the __del__ method. If any thread takes more than 10 seconds to terminate (this might
happen if its blocked waiting for an HTTP response) then it is forcibly terminating - you should see a
message in the output log if this happens.

What error messages do you see?

- Phil

-----Original Message-----
From:	grinder-use-admin@... on behalf of Andreas Niemeyer
Sent:	Thu 01/12/2005 14:24
To:	grinder-use@...
Cc:	
Subject:	[Grinder-use] Threadcontrol about the Console with def __del__(self) fails
Hi,

we want to use the Grinder Console for control the runs.

It might be a problem to terminate the threads gracefully - if the 
worker received a stopped message from the console, the `__del__' method 
isn't launched for each thread.

For testing a J2EE application where no session data should remains 
after a test is stopped,  it would be fine to perform a logout if logon, 
see snippets below.

(Continue reading)

Anthony Mangione | 2 Dec 2005 18:55

RE: Getting Session ID To Complete Dynamic Filename Request

Calum, Kristian and everyone else:

Thanks for the latest recommendations...

I put this:

response=tests[0].GET('http://hostname:81/')
print response.text

...in place, and it did output the entire response (which contained the HTML of the entire page, including the sessionID as part of a hypertext reference anchor which links to the next page of my test) to the console.

However, when I attempt to store this value in a String so that I can get what I'm looking for using either x = response.text OR x = response.getText(), it only seems to bring in the beginning of the response into the variable, not the whole thing, so I'm assuming there's a limit to what can be brought into a String variable.  Any thoughts on how to get to the sessionID in this response?

In addition, I'm having trouble with a lot of the String functions (e.g., substring, indexOf, lastIndexOf, etc...).  These are such simple functions, basic java, and I've even ensured that the functions will succeed by setting simple String variable equal to values like "ABC" and "123" just to get some sort of success...

Here is an example of the error I'm seeing:

11/30/05 12:20:15 PM (thread 0 run 0): Aborted run, script threw class org.python.core.PyException: null
Traceback (innermost last):
  File "D:\Grinder\projects\grinder_3_112905_DynamicsTest\httpscript.py", line 24, in __call__
AttributeError: 'string' object has no attribute 'substring'

        at org.python.core.Py.AttributeError(Py.java)
        at org.python.core.PyObject.__getattr__(PyObject.java)
        at org.python.core.PyObject.invoke(PyObject.java)
        at org.python.pycode._pyx0.__call__$2(D:\Grinder\projects\grinder_3_112905_DynamicsTest\httpscript.py:24)
        at org.python.pycode._pyx0.call_function(D:\Grinder\projects\grinder_3_112905_DynamicsTest\httpscript.py)
        at org.python.core.PyTableCode.call(PyTableCode.java)
        at org.python.core.PyTableCode.call(PyTableCode.java)
        at org.python.core.PyTableCode.call(PyTableCode.java)
        at org.python.core.PyFunction.__call__(PyFunction.java)
        at org.python.core.PyMethod.__call__(PyMethod.java)
        at org.python.core.PyObject.invoke(PyObject.java)
        at org.python.core.PyInstance.__call__(PyInstance.java)
        at org.python.core.PyObject.__call__(PyObject.java)
        at net.grinder.engine.process.JythonScript$JythonRunnable.run(JythonScript.java:144)
        at net.grinder.engine.process.GrinderThread.run(GrinderThread.java:128)
        at java.lang.Thread.run(Thread.java:534)

Any help would be appreciated, and thanks so much for everything so far...

Sincerely,
Anthony

Nathan Moch | 3 Dec 2005 02:32
Picon
Favicon

Pinned CPU

I am new to The Grinder and have a question regarding how much memory/cpu 
Grinder takes up.  I used the proxy to record a simple static homepage and 
then replay it in The Grinder on about 15 threads (with no user think time) 
and my CPU nearly pins.  I am running this on a Windows XP client (2.53 GHz, 
512 MB RAM) against a Linux server.   Is this normal that it would pin after 
with so few threads?
Any help would be appreciated,
Nate

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
Philip Aston | 3 Dec 2005 17:10

RE: RE: Getting Session ID To Complete Dynamic Filename Request


Anthony Mangione writes on 02 December 2005 17:56: 
 > Here is an example of the error I'm seeing: 
 > 
 > 11/30/05 12:20:15 PM (thread 0 run 0): Aborted run, script threw
class org.python.core.PyException: null 
 > Traceback (innermost last): 
 > 
 >  File
"D:\Grinder\projects\grinder_3_112905_DynamicsTest\httpscript.py", line
24, in __call__ 
 > AttributeError: 'string' object has no attribute 'substring' 

This is because the string is a Python string. You can use Python 
string functions. If you want Java strings instead, do this: 

from java.lang import String 

# ... 

javaString=String(myPythonString) 
javaString.substring(0, 10) # etc. 

- Phil 

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
David Damo-TM | 3 Dec 2005 21:46
Favicon

Add topic to the list grinder-use Archives.

Hi,

 

I am relatively new to Grinder and have a question on the recorded Grinder scripts. I notice that when you record a script through the TCPProxy that sleep times are set between an HTML pages image gets. Is the sleep time the delay in the time it took to receive the image or perhaps the time the browser needed to process the image for example? Would removing sleep times between the image gets for the HTML page cause problems?

 

Thanks

Philip Aston | 4 Dec 2005 17:46

RE: sleep times (WAS: Add topic to the list grinder-use Archives).


David Damo-TM writes on 03 December 2005 20:47: 
 > I am relatively new to Grinder and have a question on the recorded
 > Grinder scripts. I notice that when you record a script through the
 > TCPProxy that sleep times are set between an HTML pages image gets.
 > Is the sleep time the delay in the time it took to receive the
 > image or perhaps the time the browser needed to process the image
 > for example? Would removing sleep times between the image gets for
 > the HTML page cause problems?

The sleep times recorded by the TCPProxy are the recorded times. If
you're seeing sleeps before image gets, that's because your browser
took its time requesting them. Its fine to remove them.

- Phil

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
David Damo-TM | 4 Dec 2005 18:06
Favicon

RE: sleep times (WAS: Add topic to the list grinder-use Archives).

Thank you so much for your help. :)

-----Original Message-----
From: Philip Aston [mailto:paston@...] 
Sent: December 4, 2005 11:46 AM
To: David Damo-TM; grinder-use@...
Subject: RE: [Grinder-use] sleep times (WAS: Add topic to the list grinder-use Archives).

David Damo-TM writes on 03 December 2005 20:47: 
 > I am relatively new to Grinder and have a question on the recorded
 > Grinder scripts. I notice that when you record a script through the
 > TCPProxy that sleep times are set between an HTML pages image gets.
 > Is the sleep time the delay in the time it took to receive the
 > image or perhaps the time the browser needed to process the image
 > for example? Would removing sleep times between the image gets for
 > the HTML page cause problems?

The sleep times recorded by the TCPProxy are the recorded times. If
you're seeing sleeps before image gets, that's because your browser
took its time requesting them. Its fine to remove them.

- Phil

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
Philip Aston | 4 Dec 2005 19:06

RE: Pinned CPU


Nathan Moch writes on 03 December 2005 01:32:
 > I am new to The Grinder and have a question regarding how much
 > memory/cpu Grinder takes up. I used the proxy to record a simple
 > static homepage and then replay it in The Grinder on about 15
 > threads (with no user think time) and my CPU nearly pins. I am
 > running this on a Windows XP client (2.53 GHz, 512 MB RAM) against
 > a Linux server. Is this normal that it would pin after with so few
 > threads? Any help would be appreciated, Nate

If you have no user think time, any load testing framework will burn
your CPU unless the remote server causes it to be I/O bound.

By taking out the user think time, you are no longer following the
"1 thread ~ 1 user" approach. I presume that you are just trying to
load the remote server as much as possible - The Grinder is doing just
that.

- Phil

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
Nathan Moch | 5 Dec 2005 08:07
Picon
Favicon

RE: Pinned CPU

Thank you.  I will try to add some think time.  I figured it would burn the 
CPU at some point, but I
was surprised it happened with just 15 threads on a simple page.
Thanks again,
Nate

>From: "Philip Aston" <paston@...>
>To: "Nathan Moch" <nathanmoch@...>,   
><grinder-use@...>
>Subject: RE: Pinned CPU
>Date: Sun, 4 Dec 2005 18:06:12 -0000
>
>
>Nathan Moch writes on 03 December 2005 01:32:
>  > I am new to The Grinder and have a question regarding how much
>  > memory/cpu Grinder takes up. I used the proxy to record a simple
>  > static homepage and then replay it in The Grinder on about 15
>  > threads (with no user think time) and my CPU nearly pins. I am
>  > running this on a Windows XP client (2.53 GHz, 512 MB RAM) against
>  > a Linux server. Is this normal that it would pin after with so few
>  > threads? Any help would be appreciated, Nate
>
>If you have no user think time, any load testing framework will burn
>your CPU unless the remote server causes it to be I/O bound.
>
>By taking out the user think time, you are no longer following the
>"1 thread ~ 1 user" approach. I presume that you are just trying to
>load the remote server as much as possible - The Grinder is doing just
>that.
>
>- Phil
>

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

Gmane