Ouray Viney | 24 Mar 13:32 2013
Picon

Re: Grinder REST Console Service and Remote Agents

Hi Phil,


Agreed.  The strace does show that it is having issues opening a TCP connection to my Grinder Console on port 6372.  

I would like to better understand why this is happening.  Is there any way we can get more information about the connection handling done at the Grinder Console?  I don't understand why the Grinder Agent connects to the Grinder Console with no issues, yet the Grinder WorkerProcessor has issues i.e. generates a "SIGPIPE".  Doesn't this tell us that the Console may be acting up/or the System iteself?  I did some further reading on SIGPIPEs.  I am still a little confused by what is triggering the SIGPIPE at the Grinder WorkerProcess level.   What is particularly odd about this communication issue is that eventually, if I stop/start the test enough times, the problem seems to go away and the Grinder WorkerProcessors connect successfully to the Grinder Console.  Weird!  Perhaps it is time for another tcpdump trace at one of the Grinder agents when the WorkerProcessor fails to connect to the Grinder Console.

Could you elaborate a little on how the comms. works between the Grinder Console -> Grinder Agent -> Grinder WorkerProcessor?  I did look at the website architecture diagrams and the Grinder source code and have understood that the Grinder WorkerProcessor actually opens a pipe to the Grinder Console.

Greatly appreciate your patience with this odd issue.

Ouray

On Tue, Mar 12, 2013 at 2:45 PM, Philip Aston <philipa-O5WfVfzUwx8@public.gmane.org> wrote:

The strace showing the SIGPIPE is further evidence that the problem does not lie within the worker process. The socket its trying to write to has been closed.

Does the other end (the console) log anything?

- Phil


On 12/03/13 14:03, Ouray Viney wrote:
Hi Phil,
 
Thank you for sticking with this, greatly appreciated.
 
Some more details about the test that is being run by Grinder may help.
 
- We are using Grinder to run some Java client side api’s.  
- There are over 128 jars that get loaded during the first run.  
- Profiling the system during the initial run shows that the system is pinned.  I thought that this might be a contributor, but one of 9 agents is functioning correctly.  This particular system is actually a little slower than the other (less bogomips).  
- The test that Grinder instruments makes use of a local CUPs server
- The test that Grinder instruments makes use of local beans for the purpose of mailing and shipping requests being sent to a backend web service (REST).
- I profiled the Grinder agent and WorkerProcessor using visualvm (bundled with Java 1.6), not much to say other than the CPU profile once the test started was flat at 98%.

The current workaround is to start the test the first time.  Expect to see the issue, stop the test.  Start a second run and things *should* work as expected, i.e. no comms. issue from the WorkerProcessor to the Console

Cheers,

Ouray

On Tue, Mar 12, 2013 at 8:19 AM, Philip Aston <philipa-O5WfVfzUwx8@public.gmane.org> wrote:
Something is tearing down a connection, or otherwise blocking communication, on a TCP connection that was previously fine. I suspect the former, since lsof says the connection no longer exists. The trace below is just reporting that the worker could not send data to the console, and doesn't provide anything else of use.

The worker creates the connection when it starts up. It sends a few bytes of data to the console as part of establishing the connection. Then it regularly sends a report message to the console.

The worker process relies on the TCP connection being resilient. It doesn't try to re-connect.

Maybe a tcpdump would help, maybe not.

- Phil



On 11/03/13 17:28, Ouray Viney wrote:
Hi Philip,

No problem at all.  Totally appreciate that you are busy ;-).

I have noticed that when this problem occurs, I see the following exception in the agent output.  Yet, if I re-run this a few times, it eventually goes a way.  The bottom line is the communication from the WorkerProcessor to the Console is unreliable for some reason.  Please keep in mind I am not blaming The Grinder for this.

Environment details:
=================
- when the problem is reproducible, lsof reports no connection to the console
- no firewalls are blocking any of the Grinder console ports 6372/6373
- no clear signs of any issues with ulimits for the account that owns the WorkerProcessor process
- the exception trace below means that something happened, I need to review the source code I don't know what condition is causing this code to fail.

2013-03-11 12:22:22,216 INFO  3582299-001-0: Report to console failed
net.grinder.communication.CommunicationException: Exception whilst sending message
        at net.grinder.communication.AbstractSender.send(AbstractSender.java:57) ~[grinder-core-3.11.jar:na]
        at net.grinder.communication.QueuedSenderDecorator.flush(QueuedSenderDecorator.java:60) ~[grinder-core-3.11.jar:na]
        at net.grinder.engine.process.GrinderProcess.sendStatusMessage(GrinderProcess.java:638) [grinder-core-3.11.jar:na]
        at net.grinder.engine.process.GrinderProcess.access$1100(GrinderProcess.java:110) [grinder-core-3.11.jar:na]
        at net.grinder.engine.process.GrinderProcess$ReportToConsoleTimerTask.run(GrinderProcess.java:615) ~[grinder-core-3.11.jar:na]
        at net.grinder.engine.process.GrinderProcess.run(GrinderProcess.java:465) [grinder-core-3.11.jar:na]
        at net.grinder.engine.process.WorkerProcessEntryPoint.run(WorkerProcessEntryPoint.java:86) [grinder-core-3.11.jar:na]
        at net.grinder.engine.process.WorkerProcessEntryPoint.main(WorkerProcessEntryPoint.java:59) [grinder-core-3.11.jar:na]
Caused by: java.net.SocketException: Broken pipe
        at java.net.SocketOutputStream.socketWrite0(Native Method) ~[na:1.6.0_07]
        at java.net.SocketOutputStream.socketWrite(Unknown Source) ~[na:1.6.0_07]
        at java.net.SocketOutputStream.write(Unknown Source) ~[na:1.6.0_07]
        at java.io.BufferedOutputStream.flushBuffer(Unknown Source) ~[na:1.6.0_07]
        at java.io.BufferedOutputStream.flush(Unknown Source) ~[na:1.6.0_07]
        at java.io.ObjectOutputStream$BlockDataOutputStream.flush(Unknown Source) ~[na:1.6.0_07]
        at java.io.ObjectOutputStream.flush(Unknown Source) ~[na:1.6.0_07]
        at net.grinder.communication.AbstractSender.writeMessageToStream(AbstractSender.java:90) ~[grinder-core-3.11.jar:na]
        at net.grinder.communication.StreamSender.writeMessage(StreamSender.java:70) ~[grinder-core-3.11.jar:na]
        at net.grinder.communication.AbstractSender.send(AbstractSender.java:53) ~[grinder-core-3.11.jar:na]
        ... 7 common frames omitted

Kind Rgds,

Ouray

On Wed, Mar 6, 2013 at 2:57 AM, Philip Aston <philipa-O5WfVfzUwx8@public.gmane.org> wrote:

Sorry for the delay Ouray.

1) A thread dump of the worker process might be useful if it shows the worker process trying to establish a connection. But its a long shot.

What does netstat tell you? Or better, lsof -i tcp -a -p <worker process pid>?

2) If there's no summary table, the worker process isn't shutting down correctly. Can you provide the logs from a worker process?

- Phil


On 26/02/13 16:31, Ouray Viney wrote:
Hi Philip,

I wanted to revisit this thread.  I am back on this problem and would like to review your recommendations for debugging the problem.

As far as I can diagnose, the problem appears to:
======================================
1) The Worker Processor (child of the Grinder Agent JVM process) spawns correctly.  What it fails to do is communicate its tests statistics back to the Console.
2) When a given test run completes, the log has no summary table of tests results.

Suggestions on debugging so far:
==========================
1) This problem appears to be related to the Worker Processors ability to communicate to the Console - no tests stats visible in the Console GUI - no stats available when probing the REST console service for stats.  Thread dump?  I don't see what the thread dump will tell me about the lack of tests statistics making their way back to the console.  IMHO, tcpdump would perhaps be more useful here?  Open to suggestions.
2) What trigger would cause the Work Processor to not correctly create a summary table at the end of the log.  The log is populated with all the test scripts data checks etc., the data log is correctly populated.  I have no idea where to start here.  I am not afraid to review the code, but before I invest the time I thought it would be worth asking for some recommendations first.

Let me know if you require any further details.

Kind Rgds,

Ouray

On Thu, Feb 7, 2013 at 11:41 AM, Ouray Viney <ouray <at> viney.ca> wrote:
Hi Philip,

I have doubts on that.  Here is why.  I ran the problematic script, observed the issues.  Change "grinder.script = problematic.py" to "grinder.script = console.py".   Ran and saw absolutely no issues - Console and worker processors worked as expected.

I have this same setup with the problematic script working in my Ubuntu VM - no issues.

I will take your advice and generate a dump of the WorkerProcessor JVM to see what is is showing.  As well, I guess it might be worth doing a tcpdump of the WorkProcessor to Console traffic on port 6372.

Thank you for your time and advice, greatly appreciated.

Kind Rgds,

Ouray

On Thu, Feb 7, 2013 at 10:44 AM, Philip Aston <philipa <at> mail.com> wrote:
Might be a firewall thing?

The agent reports back to the console over the connection it creates when it starts up. The worker processes create their own connections.

- Phil



On 07/02/13 07:36, Ouray Viney wrote:
Hi Philip,

My comments inline

On 2013-02-07, at 2:18, Philip Aston <philipa-O5WfVfzUwx8@public.gmane.org> wrote:

If the worker process isn't logging any tests (I assume its data file is similarly empty), then they'll be no statistics to report back to the console, however it should at least have reported "worker X (m/n threads)".

Los are fine at this point.  Exactly as they should be.


What's at the start of the worker process log, does it successfully load an instrumenter?

I will check this tomorrow, but assume yes since the logs are populated correctly.


It smells like the worker threads aren't running correctly. Does the worker process log contain any errors? Are the worker threads forcibly terminated when the worker process is stopped - perhaps they're blocked in the Java code under test? Maybe take a thread dump of the worker process?

No clear sign of anything blocking.  No related errors.  Console can see the agents, just not the worker bees :-).


- Phil

On 07/02/13 07:09, Ouray Viney wrote:
Hi All,

I have nailed this issue down to a particular script.  This same script works fine in my dev. environment.  However, when I try to run the same script in a our perf. environment it causes the communication between the Console and WorkProcessors.  This script is not using the http recording model, rather a Java based test, instrumenting the Java fat client API.  Evening though the Console doesn't report any stats.  The Processes tab doesn't show the running threads, only the Agent process.  If I simply swap out the script for a sample script, things also run as expected.  This is what leads me to believe that the issue is being caused by the script (which used to work fine).

If I run a sample script with the same grinder.properties, the sample scripts behaves correctly i.e. the Console is showing stats from the WorkerProcessors.

I am getting close to having exhausted all possible things to try.

Any help would be appreciated

Ouray Viney

On Thu, Feb 7, 2013 at 1:19 AM, Ouray Viney <ouray <at> viney.ca> wrote:
Hi All,

OK, so after a bunch of testing/debugging I believe this particular issue that I described has been isolated to a particular environment.  I am not able to reproduce the issues in my dev Ubuntu VM.  

If I can figure out what the issues is in my environment, I'll post the details.  What was interesting in all my testing was the fact that a sample script from the examples dir ran fine and gave the desired behavior in the Console.

Sorry for the verbose chatter, got a little frustrated today with this one =).

Kind Rgds,

Ouray


On Wed, Feb 6, 2013 at 3:06 PM, Ouray Viney <ouray <at> viney.ca> wrote:
Another interesting fact is that the WorkProcessor log doesn't contain the summary table at the end of the log as it usually does:

2013-02-06 14:51:48,445 INFO  1128450-001-0 : elapsed time is 610319 ms
2013-02-06 14:51:48,445 INFO  1128450-001-0 : Final statistics for this process:
2013-02-06 14:51:48,457 INFO  1128450-001-0 :
             Tests        Errors       Mean Test    Test Time    TPS
                                       Time (ms)    Standard
                                                    Deviation
                                                    (ms)


Totals       0            0            -            0.00         0.00

  Tests resulting in error only contribute to the Errors column.
  Statistics for individual tests can be found in the data file, including
  (possibly incomplete) statistics for erroneous tests. Composite tests
  are marked with () and not included in the totals.


On Wed, Feb 6, 2013 at 2:09 PM, Ouray Viney <ouray <at> viney.ca> wrote:
Hi All,

What might be causing the WorkProcessors (child proc to the Agent) when running on a remote system to not correctly report back to the Console Service.  I am seeing the agents, but when I start the WorkProcessors the Console doesn't see them when I request status on the agents.  The call returns the status of the agents, but doesn't show any relevant information about the running WorkerProcessors.  I did validate the a child process did spawn.

Is there a particular Console setting/grinder.property that I need to set to allow the WorkProcessors (when running from a remote Grinder Agent) to communicate with the Grinder Console.

Environment details:
==================
- separate host for the console service
- 9 separate servers hosting two running agents
- When my test starts, two WorkerProcessors are invoked.

Other Details:
============
- I can see the WorkerProcess logs shows the test is running correctly.
- When I query the Console for  

--
Ouray Viney
http://www.viney.ca






--
Ouray Viney
http://www.viney.ca

------------------------------------------------------------------------------
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_mar
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Michael Thomsen | 20 Mar 02:17 2013
Picon

grinder.logProcessStreams = false not working in 3.11

Hello,

 

I have been using Grinder 3.6 and had both grinder.logData =false and grinder.logProcessStreams =false in my properties files working great on endurance tests.  I have upgraded to 3.11 to take advantage of parallel script execution, however it seems as though grinder.logProcessStreams no longer works? Is this by design (possibly due to the LogBack change in 3.7)? If so, is there any other way to disable logging for the output /error stream, as on long tests the log files end up quite large?

 

Thanks in advance,

Michael



Michael Thomsen
Phone: +61 2 6206 5021
Oracle Policy Automation


ORACLE Australia | Level 3, 243 Northbourne Avenue | LYNEHAM ACT 2602
"Please consider your environmental responsibility before printing this e-mail"

 

------------------------------------------------------------------------------
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_mar
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Shrenik | 19 Mar 15:27 2013

Feedback on The Grinder web site g3/getting-started.html

Hi,

 

We are planning to use Grinder for performance testing of one of our application.

 

The application is using a websocket based communication. It doesn’t follow typical http or REST/SOAP type approaches.

 

Is it possible to access server through the client for this application using WAPT?

 

Or do we need to set up a custom communication layer that also deals with the proprietary authentication message?

 

 

Thank You,

Shrenik

------------------------------------------------------------------------------
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_mar
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Saurabh | 15 Mar 21:23 2013
Picon

Grinder - Custom Statistics but not LONG or DOUBLE values

Hi All,


I am trying to use grinder to generate custom statistics from my test script. These stats are not numeric i.e. i need them to be a string like GUID or some other description

What I would prefer to do is add these to data_host-0.log file for any analyzer tool to pick up and report on these along with standard metrics which comes out of box from grinder.
Is there a way to do it ? Any help is appreciated?


--
Regards,
Saurabh
------------------------------------------------------------------------------
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_mar
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Shankar Ramanathan | 11 Mar 19:46 2013

Reading from Mysql DB using zxJDBC package

Hi Phil,

I stumbled upon another strange issue with grinder which works perfectly when run in 'GrinderStone' plugin in Eclipse. I always end up with zxJDBC pkg error inspite setting the pkg via syspath during run-time.

I'm trying to read mysql db & use the value to construct POST msg. Kindly let me know if i can look into sample code for such implementation

Cheers,
Shankar


ERROR

2013-03-11 22:32:32,496 ERROR shankar-HP-ProBook-6450b-7: aborting process - Java exception initialising test script
net.grinder.scriptengine.jython.JythonScriptExecutionException: Java exception initialising test script
    from com.ziclix.python.sql import zxJDBC
    File "/home/shankar/./shankar-HP-ProBook-6450b-file-store/current/PeaNutcomplience.py", line 18, in <module>
java.lang.NoSuchMethodError: org.python.core.PyBuiltinFunctionSet.<init>(Ljava/lang/String;IIIZLjava/lang/String;)V
    at com.ziclix.python.sql.zxJDBCFunc.<init>(zxJDBC.java:425) ~[zxJDBC.jar:na]
    at com.ziclix.python.sql.zxJDBC.classDictInit(zxJDBC.java:91) ~[zxJDBC.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_38]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_38]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_38]
    at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_38]
    at org.python.core.PyJavaType.init(PyJavaType.java:534) ~[jython-standalone-2.5.3.jar:na]
    at org.python.core.PyType.createType(PyType.java:1264) ~[jython-standalone-2.5.3.jar:na]
    at org.python.core.PyType.addFromClass(PyType.java:1201) ~[jython-standalone-2.5.3.jar:na]
    at org.python.core.PyType.fromClass(PyType.java:1291) ~[jython-standalone-2.5.3.jar:na]
    at org.python.core.adapter.ClassicPyObjectAdapter$6.adapt(ClassicPyObjectAdapter.java:76) ~[jython-standalone-2.5.3.jar:na]
    at org.python.core.adapter.ExtensiblePyObjectAdapter.adapt(ExtensiblePyObjectAdapter.java:44) ~[jython-standalone-2.5.3.jar:na]
    at org.python.core.adapter.ClassicPyObjectAdapter.adapt(ClassicPyObjectAdapter.java:120) ~[jython-standalone-2.5.3.jar:na]
    at org.python.core.Py.java2py(Py.java:1563) ~[jython-standalone-2.5.3.jar:na]


Script

from net.grinder.script.Grinder import grinder
from net.grinder.plugin.http import HTTPPluginControl, HTTPRequest
from HTTPClient import NVPair
from org.gjt.mm.mysql import Driver
from com.ziclix.python.sql import zxJDBC
from com.mysql.jdbc import  Connection
from org.json import JSONObject
from org.json import JSONString
#from Lib.dbexts import connect

connectionDefaults = HTTPPluginControl.getConnectionDefaults()
httpUtilities = HTTPPluginControl.getHTTPUtilities()


connectionDefaults.defaultHeaders = \
  [ NVPair('User-Agent', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0'),
    NVPair('Accept', 'application/json'),
    NVPair('Accept-Language', 'en-US,en;q=0.5'),
    NVPair('Content-Type', 'application/json; charset=UTF-8'), ]

request = HTTPRequest(url = "http://172.31.81.53:80")

class TestRunner:
    def __call__(self):
        while True:
            establishConnection()
       
def establishConnection():
   
    db = zxJDBC.connect("jdbc:mysql://localhost:3306/testingDB", "root", "password", "org.gjt.mm.mysql.Driver")
    cursor = db.cursor()
    cursor.execute("select * from testcase_peanutsdata")
    nRecords = cursor.fetchall()
    for row in nRecords:
            testId = row[1]
            velocityparam = row[2]
            tempParam = row[3]
            if row[4] == 0:
                tunnelStatus = False
            else:
                tunnelStatus = True
            print tunnelStatus
            grinder.sleep(5000)
            data = JSONObject()
            innerdata = JSONObject()
            innerdata.put("type","heat tunnel")
            innerdata.put("id",testId)
            innerdata.put("name",testId)
            data.put("date","2013-02-20 07:13:42.354000")
            data.put("type","HeattunnelObservation")
            data.put("ovenTempInDegreeCelsius",tempParam)
            data.put("conveyorVelocity",velocityparam)
            data.put("inOperation",str(tunnelStatus))
            data.put("touchPoint",innerdata)
            data.put("is_immediate","true")
            result = request.POST('/ibms/datacollector/v1/observations/',data.toString(), )
            print data.toString()
            #cursor.close()           
            #print "JSON: " + result.getText()
            #if ( 201 == result.getStatusCode() ):   # expecting HTTP status 201
                 #print " \n POST On Observations by TouchPoint Successfull \n"
            #else:
                 #print " \n FAILED \n"        

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
miren esnaola | 11 Mar 18:03 2013
Picon
Picon

Expect: continue-100

Hi,

We have to load test the upload of big files to a server. The server supports block-level resumption. The files are chunked and each chunk is submitted.

On the client side we have to include the "Expect: 100-continue" header in the request. The objective is to make the server check if those headers are valid first and only in that case submit the actual content of the chunk.

When the "Expect: 100-continue" header is added in the request, no Content-Length header is expected.

I have tried adding the header "Expect: 100-continue" as below

        headers = []
        headers.append(NVPair("Expect", "100-continue"))
        result = request1.POST("/", data, headers)

but I in the http client log I still see that the Content-Length header is added to my request.

Is it possible to implement such an scenario using grinder?

Thanks

M.
------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Shankar Ramanathan | 6 Mar 20:06 2013

passing JSON data

Hi Phil,


I'm trying to pass JSON dump on to HTTP method that I'm calling without much success. I'm not sure how to insert/pack json data into the request that i'm firing

Some of the field for json dump are dynamically generated & hence I cannot hard code JSON body. Below is code snippet. I'm able to print the JSON data (along with Dynamic variable) but not sure how to pass when json data is assigned/declared to a variable in this case 'jsonData' 

Using -> from com.xhaus.jyson import JysonCodec as json

def PostObservation(self):
    """POST / (request 701). Positive Testcase"""
    
    touchpt_ID = 'shankar'   <== Dynamically fetched
    temp_Seconds = '40'     <== Dynamically fetched
    
    jsonData = json.dumps({'date' : '2013-02-20 07:13:42.354000','type' : 'TemperatureSecondsRule','touchPoint' : {'type' : 'peanut roaster', 'id' : touchpt_ID,'name' : 'roaster1'},'tempSeconds' : temp_Seconds,'is_immediate' : 'True'})

    result = request.POST('/last/provisioning/v1/touchpoints/', jsonData=jsonData, )       <= Problem passing jsonData with POST request
 
    print "JSON: " + result.getText()
    
    if ( 201 == result.getStatusCode() ):   # expecting HTTP status 201
         print " \n POST On Observations by TouchPoint Successfull \n"
    else:
         print " \n FAILED \n"
         return False
         
    return result


ERROR

2013-03-07 00:12:46,491 ERROR shankar-HP-ProBook-6450b-11 thread-0 [ run-0 ]: aborted run - Jython exception, <type 'exceptions.TypeError'>: POST(): takes no keyword arguments [calling TestRunner]
net.grinder.scriptengine.jython.JythonScriptExecutionException: <type 'exceptions.TypeError'>: POST(): takes no keyword arguments
        result = request.POST('/ibms/provisioning/v1/touchpoints/', jsonData=jsonData, )
        File "/home/shankar/./shankar-HP-ProBook-6450b-file-store/current/peanut.py", line 70, in PostObservation


Cheers,
Shankar
------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Bill Smith | 4 Mar 23:25 2013
Picon

interaction between console and agent's property file

I am using The Grinder 3.11.  I specify a property file when I start my agent.  The property file specifies the following settings:

grinder.processes=15
grinder.threads=10
grinder.threadStartIndex=0
grinder.initialProcess=1
grinder.processIncrement=1
grinder.processIncrementInterval=60000
grinder.useConsole=true

With these settings, after I tell the console to start the agents, my agent runs exactly one process with one thread.

In contrast, if I use grinder.useConsole=false, my agent behaves as I expected, i.e. one initial worker with 10 threads, then an additional worker with 10 threads once per minute until I max out at 15 workers.

Thanks,
Bill Smith
Austin, TX


------------------------------------------------------------------------------
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_feb
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
vijetha kulal | 4 Mar 14:27 2013
Picon

Data recording doesn't stop after worker processes stop

Hi,

I use Grinder 3.11. I ran a test using "console service" with following grinder 

properties:
grinder.processes=1
grinder.threads=1
grinder.runs=0
grinder.duration=120000

I used the following commands:
start console:
java -classpath %CLASSPATH% net.grinder.Console -headless
start agent:
java -classpath %CLASSPATH% net.grinder.Grinder %GRINDERPROPERTIES%
start worker-process:

After 120,000 ms the worker process stopped but recording of data did not stop. I had 

run the command (after completion of the test duration) to stop recording.

Is there any way in which the collection/recording of data could stop automatically 

after completion of test duration/runs?

In grinder.properties file, it's mentioned that "the worker processes will terminate if 

either the duration time or the number of runs is exceeded."
But, in the following URL it's mentioned that "if grinder.runs is to 0 then the workers 

don't stop until instructed to do so":

Thanks
Vij
------------------------------------------------------------------------------
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_feb
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
vijetha kulal | 1 Mar 23:42 2013
Picon

All the test result in having same linear graph in Grinder Analyzer report

Hi, 

I use Grinder 3.11. I installed the Grinder Alnalyser "GrinderAnalyzer.V2.b19" to view the final report of the test run. I ran the following test for 20 iterations: 

from net.grinder.script.Grinder import grinder 
from net.grinder.script import Test 
from net.grinder.plugin.http import HTTPRequest 
from java.lang import System 

class TestRunner: 
        def __init__(self): 
                grinder.statistics.delayReports=True 
        def __call__(self): 
                Google() 

request = HTTPRequest() 
Test(1, "Google").record(request) 

def Google(): 
        currentTime = System.currentTimeMillis() 
        result = request.GET("http://www.google.com") 
        timeTaken = System.currentTimeMillis() 
        googlet = timeTaken - currentTime 
        grinder.logger.info(" vij google time " + str(googlet)) 
        grinder.statistics.forLastTest.success = True 


After running the test, Transaction per second graph was a linear graph (improper graph with just one value recorded).

The TPS graph is the same for any test I run. What could be the cause of this? Why are the response times not recorded for all the iterations? 
Attached is the graph from the report.

Thanks, 
Vij

------------------------------------------------------------------------------
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_feb
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Sean Tiley | 28 Feb 21:48 2013
Picon

Patameterization of parameters

Hello,
i am using the Grinder 3.11 and have recorder a number tests with the TCPProxy.
The last thing I need to do is to parametrize a script that simulates user registration.
 
I have the script recorded and when i manually update values between runs, it is working as expected.
 
I would now like to read in a file that contains 100 lines, each line contains the info required to register one account (comma seperated).
Each line in the file can only be used once.
 
I am having great difficulty in doing this .  partly because i do not understand where to put this code in my PY file.  
 
I think I should be able to read that file in once then set up a method that each thread could call to get a unique row from.
 
I have reviewed several posts
 
But I am struggling.
 
In java I would simply read in the file and store the contents in a data structure then access that data structure.
I just do not know how to translate that to python and where it goes.
 
Any help or insight would be greatly appreciated.
 
 
 
============Script (snipped) ===============
# The Grinder 3.11
# HTTP script recorded by TCPProxy at 28-Feb-2013 12:01:48 PM
from net.grinder.script import Test
from net.grinder.script.Grinder import grinder
from net.grinder.plugin.http import HTTPPluginControl, HTTPRequest
from HTTPClient import NVPair

connectionDefaults = HTTPPluginControl.getConnectionDefaults()
httpUtilities = HTTPPluginControl.getHTTPUtilities()
errlog = grinder.logger.error
infolog = grinder.logger.info
debug=True

# To use a proxy server, uncomment the next line and set the host and port.
# connectionDefaults.setProxyServer("localhost", 8001)
def createRequest(test, url, headers=None):
    """Create an instrumented HTTPRequest."""
    request = HTTPRequest(url=url)
    if headers: request.headers=headers
    test.record(request, HTTPRequest.getHttpMethodFilter())
    return request
# These definitions at the top level of the file are evaluated once,
# when the worker process is started.
headers0= \
  [ NVPair('Accept', 'application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*'),
    NVPair('User-Agent', 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)'),
    NVPair('Accept-Language', 'en-CA'), ]
request101 = createRequest(Test(101, 'GET FINSeCustomer_enu'), url0)
request102 = createRequest(Test(102, 'GET /'), url0)
request201 = createRequest(Test(201, 'GET start.swe'), url0)
request202 = createRequest(Test(202, 'GET rtcEditor.js'), url0)
request203 = createRequest(Test(203, 'GET swecommon_top.js'), url0)
request204 = createRequest(Test(204, 'GET navctrl.js'), url0)
request205 = createRequest(Test(205, 'GET swemessages_enu.js'), url0)
request206 = createRequest(Test(206, 'GET sweutil_keyboard.js'), url0)
request207 = createRequest(Test(207, 'GET swecommon.js'), url0)
 
 
class TestRunner:
  """A TestRunner instance is created for each worker thread."""
  # A method for each recorded page.
  def page1(self):
    """GET FINSeCustomer_enu (requests 101-102)."""
   
    # Expecting 301 'Moved Permanently'
    result = request101.GET('/FINSeCustomer_enu')
    grinder.sleep(13)
    request102.GET('/FINSeCustomer_enu/')
    saveHtmlToFile("Registration - page1",result,101)
    return result
  def page2(self):
    """GET start.swe (requests 201-207)."""
    self.token_SWECmd = \
      'Start'
    self.token_SWEHo = \
      'zzzz-dev.zzzz.com'
    result = request201.GET('/FINSeCustomer_enu/start.swe' +
      '?SWECmd=' +
      self.token_SWECmd +
      '&SWEHo=' +
      self.token_SWEHo)
    grinder.sleep(57)
    request202.GET('/FINSeCustomer_enu/21229/scripts/rtcEditor.js')
    request203.GET('/FINSeCustomer_enu/21229/scripts/swecommon_top.js')
    request204.GET('/FINSeCustomer_enu/21229/scripts/navctrl.js')
    request205.GET('/FINSeCustomer_enu/21229/scripts/swemessages_enu.js')
    request206.GET('/FINSeCustomer_enu/21229/scripts/sweutil_keyboard.js')
    grinder.sleep(16)
    request207.GET('/FINSeCustomer_enu/21229/scripts/swecommon.js')
    saveHtmlToFile("Registration - page2",result,201)
    return result

  def __call__(self):
    """Called for every run performed by the worker thread."""
    self.page1()      # GET FINSeCustomer_enu (requests 101-102)
    grinder.sleep(20)
    self.page2()      # GET start.swe (requests 201-207)
 
# Instrument page methods.
Test(100, 'Page 1').record(TestRunner.page1)
Test(200, 'Page 2').record(TestRunner.page2)
 
def saveHtmlToFile (prefix,response,testId):
    filename = ""
    if debug == True:
  inputStream = response.getInputStream()
  filename = "%s--%s-%d-page-%d.html" % (prefix,grinder.processName,testId,grinder.runNumber)
  file = open(filename, "w")
  i = 1
  cc = inputStream.available()
  while (i <= cc):
    c = inputStream.read()
    file.write("%c" % c)
    i += 1
  inputStream.close()
  file.close()
    return filename
 
def validateResponse (prefix, response,testId,stringToValidateExistence):
 checkResponseForError(prefix, response,testId)
 if not stringToValidateExistence in response.getText():
  grinder.statistics.forLastTest.setSuccess(0)
  fail= "%s-%d-%d - String validation failure. Expected %s but it was not found" % (grinder.processName,testId,grinder.runNumber,stringToValidateExistence)
  errlog(fail)
  saveHtmlToFile(prefix, response,testId)
 else:
  success = "%s-%d-%d - String validation Success. Expected and found %s in response" % (grinder.processName,testId,grinder.runNumber,stringToValidateExistence)
  infolog(success)
 return response
 
def checkResponseForError (prefix,response,testId):
 if "SBL-" in response.getText():
  grinder.statistics.forLastTest.setSuccess(0)
  fail= "%s-%d-%d ERROR SBL- Found in response, this indicates an error" % (grinder.processName,testId,grinder.runNumber)
  errlog(fail)
 return response
 
Sean
 
------------------------------------------------------------------------------
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_feb
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use

Gmane