Quantcast

Gathering stats from messageReceived via MQTT

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Gathering stats from messageReceived via MQTT

Joel Lucuik
Hi,

I am using MQTTv3 on a client project. I am trying to measure the grinder stats for it. Specifically the messageArrived callback.

I only get stats for messageArrived when it's ***not instrumented***.

Any advice on how to instrument/gather stats? I put a try block in there in case there were errors. To no avail.

Code below:

Thanks,
Joel

"========================================="
def instrumentMethod(test, method_name, c=TestRunner):
    """Instrument a method with the given Test."""
    unadorned = getattr(c, method_name)
    import new
    method = new.instancemethod(test.wrap(unadorned), None, c)
    setattr(c, method_name, method)
   

# Replace each method with an instrumented version.
# You can call the unadorned method using self.page1.__target__().
# Only change these, as they seem to override the statements at the top
# of the script.
instrumentMethod(Test(3100, '%s - MESSAGE_ARRIVED' % testId), 'messageArrivedHelper', TestRunnerCallback)


class TestRunnerCallback(MqttCallback):
   
    """ Constructor """
    def __init__(self):
        self.receivedMessages = 0
        info("Callback init" )
        self.connectionLost = False

    def connectionLost(self, cause):
        #This method is called when the connection to the server is lost.
        info("connectionLost called" )
       
    def deliveryComplete(self, token): 
        #Called when delivery for a message has been completed, and all acknowledgments have been received.
        info("deliveryComplete called")
       
    def messageArrived(self, topic, message): 
        try:
            #info("User Data is : %s" % message.toString())
            info("Received msg for topic %s " % (topic))
            self.receivedMessages = self.receivedMessages + 1
        except MqttException, err:
            raise RuntimeError("Exception caused by: %s" % str(err))

"========================================="






------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gathering stats from messageReceived via MQTT

Joel Lucuik
Hi all,

A little clarification. We are trying to run a performance test involving MQTT.

MQTT does pub/sub. Our test subscribes to receive pubs and launches a separate Thread to receive the callbacks for the messages being published by others.

The goal is to count the messages and measure the response times, etc of the receipt of the messages.

When we instrument messageArrived (the callback), the messages are not received at all. They are only received when we don't instrument messageArrived.

I am thinking of interacting with grinder at a lower level (similar to what the instrumentation would do), within messageArrived.

Any suggestions would be great.

Joel

On Mon, Apr 11, 2016 at 4:36 PM, Joel Lucuik <[hidden email]> wrote:
Hi,

I am using MQTTv3 on a client project. I am trying to measure the grinder stats for it. Specifically the messageArrived callback.

I only get stats for messageArrived when it's ***not instrumented***.

Any advice on how to instrument/gather stats? I put a try block in there in case there were errors. To no avail.

Code below:

Thanks,
Joel

"========================================="
def instrumentMethod(test, method_name, c=TestRunner):
    """Instrument a method with the given Test."""
    unadorned = getattr(c, method_name)
    import new
    method = new.instancemethod(test.wrap(unadorned), None, c)
    setattr(c, method_name, method)
   

# Replace each method with an instrumented version.
# You can call the unadorned method using self.page1.__target__().
# Only change these, as they seem to override the statements at the top
# of the script.
instrumentMethod(Test(3100, '%s - MESSAGE_ARRIVED' % testId), 'messageArrived', TestRunnerCallback)


class TestRunnerCallback(MqttCallback):
   
    """ Constructor """
    def __init__(self):
        self.receivedMessages = 0
        info("Callback init" )
        self.connectionLost = False

    def connectionLost(self, cause):
        #This method is called when the connection to the server is lost.
        info("connectionLost called" )
       
    def deliveryComplete(self, token): 
        #Called when delivery for a message has been completed, and all acknowledgments have been received.
        info("deliveryComplete called")
       
    def messageArrived(self, topic, message): 
        try:
            #info("User Data is : %s" % message.toString())
            info("Received msg for topic %s " % (topic))
            self.receivedMessages = self.receivedMessages + 1
        except MqttException, err:
            raise RuntimeError("Exception caused by: %s" % str(err))

"========================================="







------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Grinder test result not data

Gang Yan

Hi all:

 

I run  grinder testing LDAP stress test. But not test data after finishing test. See test data log:  Thanks!

 

more uapgv4041.us.oracle.com-0-data.log

Thread, Run, Test, Start time (ms since Epoch), Test time, Errors

 

more uapgv4041.us.oracle.com-0.log

2016-04-19 09:32:15,773 INFO  com-0 : The Grinder version 3.11

2016-04-19 09:32:15,778 INFO  com-0 : Java(TM) SE Runtime Environment 1.7.0_45-b35: Java HotSpot(TM) 64-Bit Server VM (24.45-b08, mixed mode) on Linux amd64 3.8.13-118.3.2.el6uek.x86_64

2016-04-19 09:32:15,781 INFO  com-0 : time zone is UTC (+0000)

2016-04-19 09:32:15,898 INFO  com-0 : worker process 0

2016-04-19 09:32:15,953 INFO  com-0 : instrumentation agents: byte code transforming instrumenter for Jython 2.5; byte code transforming instrumenter for Java

2016-04-19 09:32:18,611 INFO  com-0 : run mode is continuous, duration is 0:10:00

2016-04-19 09:32:18,611 INFO  com-0 : running "test_ldap.py" using Jython 2.5.3 (2.5:c56500f08d34+, Aug 13 2012, 14:54:35)

[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]

2016-04-19 09:32:18,658 INFO  com-0 thread-5: starting, will do 1 run

2016-04-19 09:32:18,658 INFO  com-0 thread-4: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-3: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-2: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-1: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-0: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-6: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-7: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 thread-8: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 thread-9: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 : start time is 1461058338660 ms since Epoch

2016-04-19 09:42:18,713 INFO  com-0 thread-9: finished 1 run

2016-04-19 09:42:18,713 INFO  com-0 thread-4: finished 1 run

2016-04-19 09:42:18,754 INFO  com-0 thread-5: finished 1 run

2016-04-19 09:42:18,788 INFO  com-0 thread-1: finished 1 run

2016-04-19 09:42:18,842 INFO  com-0 thread-8: finished 1 run

2016-04-19 09:42:18,843 INFO  com-0 thread-6: finished 1 run

2016-04-19 09:42:18,871 INFO  com-0 thread-2: finished 1 run

2016-04-19 09:42:18,888 INFO  com-0 thread-3: finished 1 run

2016-04-19 09:42:18,928 INFO  com-0 thread-7: finished 1 run

2016-04-19 09:42:18,930 INFO  com-0 thread-0: finished 1 run

2016-04-19 09:42:18,930 INFO  com-0 : elapsed time is 600270 ms

2016-04-19 09:42:18,930 INFO  com-0 : Final statistics for this process:

2016-04-19 09:42:18,937 INFO  com-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.

 

 

My test script:

 

more test_ldap.py

# The sorting test supports a configurable array length.

# It runs the JavaTest.sort method of the JavaTest class.

 

from net.grinder.script.Grinder import grinder

from net.grinder.script import Test

from datetime import datetime

from datetime import timedelta

import os

import sys

 

########################################

#

# main body of test script starts here

#

########################################

 

# Get the propeties to access test configuration information

properties = grinder.getProperties()

 

# The description is a property (instead of a hardcoded string in this script)

test = Test(1, properties.get("javatest.description"))

 

# select the method for which to collect information

#test.record(WriteMulitpleLittleFile.write)

 

# initialize data for compressing

#fileName = properties.get("javatest.fileToCompress")

#grinder.logger.info("data file to compress is " + fileName)

#JavaTest.initializeCompression(fileName)

 

# If the run mode is runOnce, the TestRunner class will

# run once.  Otherwise, if the run mode is continuous,

# the TestRunner class will run the test for at least

# the specified duration (but possibly longer)

runMode = properties.get("javatest.runMode")

#WriteMulitpleLittleFile.setParameters(dir, fileSize...)

if runMode == "continuous":

  # figure out how long to run the test

  m = int(properties.getProperty("javatest.durationMinutes", "0"))

  h = int(properties.getProperty("javatest.durationHours", "0"))

  d = int(properties.getProperty("javatest.durationDays", "0"))

  duration = timedelta(minutes=m,hours=h,days=d)

  grinder.logger.info("run mode is continuous, duration is " + str(duration))

elif runMode == "runOnce":

  grinder.logger.info("run mode is run once")

  duration = timedelta(minutes=0)

else:

  grinder.logger.info("run mode not set or not recongized, default to run once")

  duration = timedelta(minutes=0)

 

########################################

#

# The TestRunner class is used by The Grinder to perform the test

#

########################################

 

class TestRunner:

  def __call__(self):

    endTime = datetime.now() + duration

    notDone = True

    while notDone:

      os.environ['ORACLE_HOME'] = "/u03/Middleware/Oracle_IDM"

 

      from commands import getoutput

      result = getoutput( '/u03/Middleware/Oracle_IDM/bin/ldapsearch -a always -D cn=orcladmin -w welcome1 -p 3060 -b "" -s sub "objectclass=*" orcldirectoryversion ou=Groups Privilege, cn=Operatio

nURLs,cn=DAS,cn=Products,cn=OracleContext,dc=cn,dc=oracle,dc=com')

      print result

      notDone = datetime.now() < endTime

 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grinder test result not data

Joel Lucuik
Hi all,

Just an update.

We solved this by realizing this was asynchronous, and that doesn't work well with Grinder.

So referencing this:

http://grinder.sourceforge.net/g3/script-gallery.html#jmsreceiver.py

..And using grinder.statistics for the reporting and queues to count received messages, and we send the times in the payload.

This is working well.

Joel

On Tue, Apr 19, 2016 at 6:12 AM, Gang Yan <[hidden email]> wrote:

Hi all:

 

I run  grinder testing LDAP stress test. But not test data after finishing test. See test data log:  Thanks!

 

more uapgv4041.us.oracle.com-0-data.log

Thread, Run, Test, Start time (ms since Epoch), Test time, Errors

 

more uapgv4041.us.oracle.com-0.log

2016-04-19 09:32:15,773 INFO  com-0 : The Grinder version 3.11

2016-04-19 09:32:15,778 INFO  com-0 : Java(TM) SE Runtime Environment 1.7.0_45-b35: Java HotSpot(TM) 64-Bit Server VM (24.45-b08, mixed mode) on Linux amd64 3.8.13-118.3.2.el6uek.x86_64

2016-04-19 09:32:15,781 INFO  com-0 : time zone is UTC (+0000)

2016-04-19 09:32:15,898 INFO  com-0 : worker process 0

2016-04-19 09:32:15,953 INFO  com-0 : instrumentation agents: byte code transforming instrumenter for Jython 2.5; byte code transforming instrumenter for Java

2016-04-19 09:32:18,611 INFO  com-0 : run mode is continuous, duration is 0:10:00

2016-04-19 09:32:18,611 INFO  com-0 : running "test_ldap.py" using Jython 2.5.3 (2.5:c56500f08d34+, Aug 13 2012, 14:54:35)

[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]

2016-04-19 09:32:18,658 INFO  com-0 thread-5: starting, will do 1 run

2016-04-19 09:32:18,658 INFO  com-0 thread-4: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-3: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-2: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-1: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-0: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-6: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-7: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 thread-8: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 thread-9: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 : start time is 1461058338660 ms since Epoch

2016-04-19 09:42:18,713 INFO  com-0 thread-9: finished 1 run

2016-04-19 09:42:18,713 INFO  com-0 thread-4: finished 1 run

2016-04-19 09:42:18,754 INFO  com-0 thread-5: finished 1 run

2016-04-19 09:42:18,788 INFO  com-0 thread-1: finished 1 run

2016-04-19 09:42:18,842 INFO  com-0 thread-8: finished 1 run

2016-04-19 09:42:18,843 INFO  com-0 thread-6: finished 1 run

2016-04-19 09:42:18,871 INFO  com-0 thread-2: finished 1 run

2016-04-19 09:42:18,888 INFO  com-0 thread-3: finished 1 run

2016-04-19 09:42:18,928 INFO  com-0 thread-7: finished 1 run

2016-04-19 09:42:18,930 INFO  com-0 thread-0: finished 1 run

2016-04-19 09:42:18,930 INFO  com-0 : elapsed time is 600270 ms

2016-04-19 09:42:18,930 INFO  com-0 : Final statistics for this process:

2016-04-19 09:42:18,937 INFO  com-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.

 

 

My test script:

 

more test_ldap.py

# The sorting test supports a configurable array length.

# It runs the JavaTest.sort method of the JavaTest class.

 

from net.grinder.script.Grinder import grinder

from net.grinder.script import Test

from datetime import datetime

from datetime import timedelta

import os

import sys

 

########################################

#

# main body of test script starts here

#

########################################

 

# Get the propeties to access test configuration information

properties = grinder.getProperties()

 

# The description is a property (instead of a hardcoded string in this script)

test = Test(1, properties.get("javatest.description"))

 

# select the method for which to collect information

#test.record(WriteMulitpleLittleFile.write)

 

# initialize data for compressing

#fileName = properties.get("javatest.fileToCompress")

#grinder.logger.info("data file to compress is " + fileName)

#JavaTest.initializeCompression(fileName)

 

# If the run mode is runOnce, the TestRunner class will

# run once.  Otherwise, if the run mode is continuous,

# the TestRunner class will run the test for at least

# the specified duration (but possibly longer)

runMode = properties.get("javatest.runMode")

#WriteMulitpleLittleFile.setParameters(dir, fileSize...)

if runMode == "continuous":

  # figure out how long to run the test

  m = int(properties.getProperty("javatest.durationMinutes", "0"))

  h = int(properties.getProperty("javatest.durationHours", "0"))

  d = int(properties.getProperty("javatest.durationDays", "0"))

  duration = timedelta(minutes=m,hours=h,days=d)

  grinder.logger.info("run mode is continuous, duration is " + str(duration))

elif runMode == "runOnce":

  grinder.logger.info("run mode is run once")

  duration = timedelta(minutes=0)

else:

  grinder.logger.info("run mode not set or not recongized, default to run once")

  duration = timedelta(minutes=0)

 

########################################

#

# The TestRunner class is used by The Grinder to perform the test

#

########################################

 

class TestRunner:

  def __call__(self):

    endTime = datetime.now() + duration

    notDone = True

    while notDone:

      os.environ['ORACLE_HOME'] = "/u03/Middleware/Oracle_IDM"

 

      from commands import getoutput

      result = getoutput( '/u03/Middleware/Oracle_IDM/bin/ldapsearch -a always -D cn=orcladmin -w welcome1 -p 3060 -b "" -s sub "objectclass=*" orcldirectoryversion ou=Groups Privilege, cn=Operatio

nURLs,cn=DAS,cn=Products,cn=OracleContext,dc=cn,dc=oracle,dc=com')

      print result

      notDone = datetime.now() < endTime

 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use



------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grinder test result not data

Gang Yan

Hi Joel

 

Thanks you reply!

 

I have question:  you mean add  grinder.statistics to test script? 

 

Thanks!

 

 

From: Joel Lucuik [mailto:[hidden email]]
Sent: 2016
419 19:36
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Hi all,

Just an update.

We solved this by realizing this was asynchronous, and that doesn't work well with Grinder.

So referencing this:

http://grinder.sourceforge.net/g3/script-gallery.html#jmsreceiver.py

..And using grinder.statistics for the reporting and queues to count received messages, and we send the times in the payload.

This is working well.

Joel

 

On Tue, Apr 19, 2016 at 6:12 AM, Gang Yan <[hidden email]> wrote:

Hi all:

 

I run  grinder testing LDAP stress test. But not test data after finishing test. See test data log:  Thanks!

 

more uapgv4041.us.oracle.com-0-data.log

Thread, Run, Test, Start time (ms since Epoch), Test time, Errors

 

more uapgv4041.us.oracle.com-0.log

2016-04-19 09:32:15,773 INFO  com-0 : The Grinder version 3.11

2016-04-19 09:32:15,778 INFO  com-0 : Java(TM) SE Runtime Environment 1.7.0_45-b35: Java HotSpot(TM) 64-Bit Server VM (24.45-b08, mixed mode) on Linux amd64 3.8.13-118.3.2.el6uek.x86_64

2016-04-19 09:32:15,781 INFO  com-0 : time zone is UTC (+0000)

2016-04-19 09:32:15,898 INFO  com-0 : worker process 0

2016-04-19 09:32:15,953 INFO  com-0 : instrumentation agents: byte code transforming instrumenter for Jython 2.5; byte code transforming instrumenter for Java

2016-04-19 09:32:18,611 INFO  com-0 : run mode is continuous, duration is 0:10:00

2016-04-19 09:32:18,611 INFO  com-0 : running "test_ldap.py" using Jython 2.5.3 (2.5:c56500f08d34+, Aug 13 2012, 14:54:35)

[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]

2016-04-19 09:32:18,658 INFO  com-0 thread-5: starting, will do 1 run

2016-04-19 09:32:18,658 INFO  com-0 thread-4: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-3: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-2: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-1: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-0: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-6: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-7: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 thread-8: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 thread-9: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 : start time is 1461058338660 ms since Epoch

2016-04-19 09:42:18,713 INFO  com-0 thread-9: finished 1 run

2016-04-19 09:42:18,713 INFO  com-0 thread-4: finished 1 run

2016-04-19 09:42:18,754 INFO  com-0 thread-5: finished 1 run

2016-04-19 09:42:18,788 INFO  com-0 thread-1: finished 1 run

2016-04-19 09:42:18,842 INFO  com-0 thread-8: finished 1 run

2016-04-19 09:42:18,843 INFO  com-0 thread-6: finished 1 run

2016-04-19 09:42:18,871 INFO  com-0 thread-2: finished 1 run

2016-04-19 09:42:18,888 INFO  com-0 thread-3: finished 1 run

2016-04-19 09:42:18,928 INFO  com-0 thread-7: finished 1 run

2016-04-19 09:42:18,930 INFO  com-0 thread-0: finished 1 run

2016-04-19 09:42:18,930 INFO  com-0 : elapsed time is 600270 ms

2016-04-19 09:42:18,930 INFO  com-0 : Final statistics for this process:

2016-04-19 09:42:18,937 INFO  com-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.

 

 

My test script:

 

more test_ldap.py

# The sorting test supports a configurable array length.

# It runs the JavaTest.sort method of the JavaTest class.

 

from net.grinder.script.Grinder import grinder

from net.grinder.script import Test

from datetime import datetime

from datetime import timedelta

import os

import sys

 

########################################

#

# main body of test script starts here

#

########################################

 

# Get the propeties to access test configuration information

properties = grinder.getProperties()

 

# The description is a property (instead of a hardcoded string in this script)

test = Test(1, properties.get("javatest.description"))

 

# select the method for which to collect information

#test.record(WriteMulitpleLittleFile.write)

 

# initialize data for compressing

#fileName = properties.get("javatest.fileToCompress")

#grinder.logger.info("data file to compress is " + fileName)

#JavaTest.initializeCompression(fileName)

 

# If the run mode is runOnce, the TestRunner class will

# run once.  Otherwise, if the run mode is continuous,

# the TestRunner class will run the test for at least

# the specified duration (but possibly longer)

runMode = properties.get("javatest.runMode")

#WriteMulitpleLittleFile.setParameters(dir, fileSize...)

if runMode == "continuous":

  # figure out how long to run the test

  m = int(properties.getProperty("javatest.durationMinutes", "0"))

  h = int(properties.getProperty("javatest.durationHours", "0"))

  d = int(properties.getProperty("javatest.durationDays", "0"))

  duration = timedelta(minutes=m,hours=h,days=d)

  grinder.logger.info("run mode is continuous, duration is " + str(duration))

elif runMode == "runOnce":

  grinder.logger.info("run mode is run once")

  duration = timedelta(minutes=0)

else:

  grinder.logger.info("run mode not set or not recongized, default to run once")

  duration = timedelta(minutes=0)

 

########################################

#

# The TestRunner class is used by The Grinder to perform the test

#

########################################

 

class TestRunner:

  def __call__(self):

    endTime = datetime.now() + duration

    notDone = True

    while notDone:

      os.environ['ORACLE_HOME'] = "/u03/Middleware/Oracle_IDM"

 

      from commands import getoutput

      result = getoutput( '/u03/Middleware/Oracle_IDM/bin/ldapsearch -a always -D cn=orcladmin -w welcome1 -p 3060 -b "" -s sub "objectclass=*" orcldirectoryversion ou=Groups Privilege, cn=Operatio

nURLs,cn=DAS,cn=Products,cn=OracleContext,dc=cn,dc=oracle,dc=com')

      print result

      notDone = datetime.now() < endTime

 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use

 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grinder test result not data

Joel Lucuik

Yes.

Check the script I included. It provides an example

Joel

On Apr 19, 2016 9:43 PM, "Gang Yan" <[hidden email]> wrote:

Hi Joel

 

Thanks you reply!

 

I have question:  you mean add  grinder.statistics to test script? 

 

Thanks!

 

 

From: Joel Lucuik [mailto:[hidden email]]
Sent: 2016
419 19:36
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Hi all,

Just an update.

We solved this by realizing this was asynchronous, and that doesn't work well with Grinder.

So referencing this:

http://grinder.sourceforge.net/g3/script-gallery.html#jmsreceiver.py

..And using grinder.statistics for the reporting and queues to count received messages, and we send the times in the payload.

This is working well.

Joel

 

On Tue, Apr 19, 2016 at 6:12 AM, Gang Yan <[hidden email]> wrote:

Hi all:

 

I run  grinder testing LDAP stress test. But not test data after finishing test. See test data log:  Thanks!

 

more uapgv4041.us.oracle.com-0-data.log

Thread, Run, Test, Start time (ms since Epoch), Test time, Errors

 

more uapgv4041.us.oracle.com-0.log

2016-04-19 09:32:15,773 INFO  com-0 : The Grinder version 3.11

2016-04-19 09:32:15,778 INFO  com-0 : Java(TM) SE Runtime Environment 1.7.0_45-b35: Java HotSpot(TM) 64-Bit Server VM (24.45-b08, mixed mode) on Linux amd64 3.8.13-118.3.2.el6uek.x86_64

2016-04-19 09:32:15,781 INFO  com-0 : time zone is UTC (+0000)

2016-04-19 09:32:15,898 INFO  com-0 : worker process 0

2016-04-19 09:32:15,953 INFO  com-0 : instrumentation agents: byte code transforming instrumenter for Jython 2.5; byte code transforming instrumenter for Java

2016-04-19 09:32:18,611 INFO  com-0 : run mode is continuous, duration is 0:10:00

2016-04-19 09:32:18,611 INFO  com-0 : running "test_ldap.py" using Jython 2.5.3 (2.5:c56500f08d34+, Aug 13 2012, 14:54:35)

[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]

2016-04-19 09:32:18,658 INFO  com-0 thread-5: starting, will do 1 run

2016-04-19 09:32:18,658 INFO  com-0 thread-4: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-3: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-2: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-1: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-0: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-6: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-7: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 thread-8: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 thread-9: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 : start time is 1461058338660 ms since Epoch

2016-04-19 09:42:18,713 INFO  com-0 thread-9: finished 1 run

2016-04-19 09:42:18,713 INFO  com-0 thread-4: finished 1 run

2016-04-19 09:42:18,754 INFO  com-0 thread-5: finished 1 run

2016-04-19 09:42:18,788 INFO  com-0 thread-1: finished 1 run

2016-04-19 09:42:18,842 INFO  com-0 thread-8: finished 1 run

2016-04-19 09:42:18,843 INFO  com-0 thread-6: finished 1 run

2016-04-19 09:42:18,871 INFO  com-0 thread-2: finished 1 run

2016-04-19 09:42:18,888 INFO  com-0 thread-3: finished 1 run

2016-04-19 09:42:18,928 INFO  com-0 thread-7: finished 1 run

2016-04-19 09:42:18,930 INFO  com-0 thread-0: finished 1 run

2016-04-19 09:42:18,930 INFO  com-0 : elapsed time is 600270 ms

2016-04-19 09:42:18,930 INFO  com-0 : Final statistics for this process:

2016-04-19 09:42:18,937 INFO  com-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.

 

 

My test script:

 

more test_ldap.py

# The sorting test supports a configurable array length.

# It runs the JavaTest.sort method of the JavaTest class.

 

from net.grinder.script.Grinder import grinder

from net.grinder.script import Test

from datetime import datetime

from datetime import timedelta

import os

import sys

 

########################################

#

# main body of test script starts here

#

########################################

 

# Get the propeties to access test configuration information

properties = grinder.getProperties()

 

# The description is a property (instead of a hardcoded string in this script)

test = Test(1, properties.get("javatest.description"))

 

# select the method for which to collect information

#test.record(WriteMulitpleLittleFile.write)

 

# initialize data for compressing

#fileName = properties.get("javatest.fileToCompress")

#grinder.logger.info("data file to compress is " + fileName)

#JavaTest.initializeCompression(fileName)

 

# If the run mode is runOnce, the TestRunner class will

# run once.  Otherwise, if the run mode is continuous,

# the TestRunner class will run the test for at least

# the specified duration (but possibly longer)

runMode = properties.get("javatest.runMode")

#WriteMulitpleLittleFile.setParameters(dir, fileSize...)

if runMode == "continuous":

  # figure out how long to run the test

  m = int(properties.getProperty("javatest.durationMinutes", "0"))

  h = int(properties.getProperty("javatest.durationHours", "0"))

  d = int(properties.getProperty("javatest.durationDays", "0"))

  duration = timedelta(minutes=m,hours=h,days=d)

  grinder.logger.info("run mode is continuous, duration is " + str(duration))

elif runMode == "runOnce":

  grinder.logger.info("run mode is run once")

  duration = timedelta(minutes=0)

else:

  grinder.logger.info("run mode not set or not recongized, default to run once")

  duration = timedelta(minutes=0)

 

########################################

#

# The TestRunner class is used by The Grinder to perform the test

#

########################################

 

class TestRunner:

  def __call__(self):

    endTime = datetime.now() + duration

    notDone = True

    while notDone:

      os.environ['ORACLE_HOME'] = "/u03/Middleware/Oracle_IDM"

 

      from commands import getoutput

      result = getoutput( '/u03/Middleware/Oracle_IDM/bin/ldapsearch -a always -D cn=orcladmin -w welcome1 -p 3060 -b "" -s sub "objectclass=*" orcldirectoryversion ou=Groups Privilege, cn=Operatio

nURLs,cn=DAS,cn=Products,cn=OracleContext,dc=cn,dc=oracle,dc=com')

      print result

      notDone = datetime.now() < endTime

 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use

 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grinder test result not data

Gang Yan

Hi Joel

I  add grinder.statistics to test script

 

grinder.statistics.registerDataLogExpression("TestTime", "userLong4")

 

def recordTestTime(TestTime):

grinder.statistics.forCurrentTest.setValue("userLong4", TestTime)

 

 

But still not test data result .

 

Thanks!

 

From: Joel Lucuik [mailto:[hidden email]]
Sent: 2016
420 10:50
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Yes.

Check the script I included. It provides an example

Joel

On Apr 19, 2016 9:43 PM, "Gang Yan" <[hidden email]> wrote:

Hi Joel

 

Thanks you reply!

 

I have question:  you mean add  grinder.statistics to test script? 

 

Thanks!

 

 

From: Joel Lucuik [mailto:[hidden email]]
Sent: 2016
419 19:36
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Hi all,

Just an update.

We solved this by realizing this was asynchronous, and that doesn't work well with Grinder.

So referencing this:

http://grinder.sourceforge.net/g3/script-gallery.html#jmsreceiver.py

..And using grinder.statistics for the reporting and queues to count received messages, and we send the times in the payload.

This is working well.

Joel

 

On Tue, Apr 19, 2016 at 6:12 AM, Gang Yan <[hidden email]> wrote:

Hi all:

 

I run  grinder testing LDAP stress test. But not test data after finishing test. See test data log:  Thanks!

 

more uapgv4041.us.oracle.com-0-data.log

Thread, Run, Test, Start time (ms since Epoch), Test time, Errors

 

more uapgv4041.us.oracle.com-0.log

2016-04-19 09:32:15,773 INFO  com-0 : The Grinder version 3.11

2016-04-19 09:32:15,778 INFO  com-0 : Java(TM) SE Runtime Environment 1.7.0_45-b35: Java HotSpot(TM) 64-Bit Server VM (24.45-b08, mixed mode) on Linux amd64 3.8.13-118.3.2.el6uek.x86_64

2016-04-19 09:32:15,781 INFO  com-0 : time zone is UTC (+0000)

2016-04-19 09:32:15,898 INFO  com-0 : worker process 0

2016-04-19 09:32:15,953 INFO  com-0 : instrumentation agents: byte code transforming instrumenter for Jython 2.5; byte code transforming instrumenter for Java

2016-04-19 09:32:18,611 INFO  com-0 : run mode is continuous, duration is 0:10:00

2016-04-19 09:32:18,611 INFO  com-0 : running "test_ldap.py" using Jython 2.5.3 (2.5:c56500f08d34+, Aug 13 2012, 14:54:35)

[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]

2016-04-19 09:32:18,658 INFO  com-0 thread-5: starting, will do 1 run

2016-04-19 09:32:18,658 INFO  com-0 thread-4: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-3: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-2: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-1: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-0: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-6: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-7: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 thread-8: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 thread-9: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 : start time is 1461058338660 ms since Epoch

2016-04-19 09:42:18,713 INFO  com-0 thread-9: finished 1 run

2016-04-19 09:42:18,713 INFO  com-0 thread-4: finished 1 run

2016-04-19 09:42:18,754 INFO  com-0 thread-5: finished 1 run

2016-04-19 09:42:18,788 INFO  com-0 thread-1: finished 1 run

2016-04-19 09:42:18,842 INFO  com-0 thread-8: finished 1 run

2016-04-19 09:42:18,843 INFO  com-0 thread-6: finished 1 run

2016-04-19 09:42:18,871 INFO  com-0 thread-2: finished 1 run

2016-04-19 09:42:18,888 INFO  com-0 thread-3: finished 1 run

2016-04-19 09:42:18,928 INFO  com-0 thread-7: finished 1 run

2016-04-19 09:42:18,930 INFO  com-0 thread-0: finished 1 run

2016-04-19 09:42:18,930 INFO  com-0 : elapsed time is 600270 ms

2016-04-19 09:42:18,930 INFO  com-0 : Final statistics for this process:

2016-04-19 09:42:18,937 INFO  com-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.

 

 

My test script:

 

more test_ldap.py

# The sorting test supports a configurable array length.

# It runs the JavaTest.sort method of the JavaTest class.

 

from net.grinder.script.Grinder import grinder

from net.grinder.script import Test

from datetime import datetime

from datetime import timedelta

import os

import sys

 

########################################

#

# main body of test script starts here

#

########################################

 

# Get the propeties to access test configuration information

properties = grinder.getProperties()

 

# The description is a property (instead of a hardcoded string in this script)

test = Test(1, properties.get("javatest.description"))

 

# select the method for which to collect information

#test.record(WriteMulitpleLittleFile.write)

 

# initialize data for compressing

#fileName = properties.get("javatest.fileToCompress")

#grinder.logger.info("data file to compress is " + fileName)

#JavaTest.initializeCompression(fileName)

 

# If the run mode is runOnce, the TestRunner class will

# run once.  Otherwise, if the run mode is continuous,

# the TestRunner class will run the test for at least

# the specified duration (but possibly longer)

runMode = properties.get("javatest.runMode")

#WriteMulitpleLittleFile.setParameters(dir, fileSize...)

if runMode == "continuous":

  # figure out how long to run the test

  m = int(properties.getProperty("javatest.durationMinutes", "0"))

  h = int(properties.getProperty("javatest.durationHours", "0"))

  d = int(properties.getProperty("javatest.durationDays", "0"))

  duration = timedelta(minutes=m,hours=h,days=d)

  grinder.logger.info("run mode is continuous, duration is " + str(duration))

elif runMode == "runOnce":

  grinder.logger.info("run mode is run once")

  duration = timedelta(minutes=0)

else:

  grinder.logger.info("run mode not set or not recongized, default to run once")

  duration = timedelta(minutes=0)

 

########################################

#

# The TestRunner class is used by The Grinder to perform the test

#

########################################

 

class TestRunner:

  def __call__(self):

    endTime = datetime.now() + duration

    notDone = True

    while notDone:

      os.environ['ORACLE_HOME'] = "/u03/Middleware/Oracle_IDM"

 

      from commands import getoutput

      result = getoutput( '/u03/Middleware/Oracle_IDM/bin/ldapsearch -a always -D cn=orcladmin -w welcome1 -p 3060 -b "" -s sub "objectclass=*" orcldirectoryversion ou=Groups Privilege, cn=Operatio

nURLs,cn=DAS,cn=Products,cn=OracleContext,dc=cn,dc=oracle,dc=com')

      print result

      notDone = datetime.now() < endTime

 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use

 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grinder test result not data

Gang Yan

Test script:

 

# The sorting test supports a configurable array length.

# It runs the JavaTest.sort method of the JavaTest class.

 

from net.grinder.script.Grinder import grinder

from net.grinder.script import Test

from datetime import datetime

from datetime import timedelta

import os

import sys

 

########################################

#

# main body of test script starts here

#

########################################

 

# Get the propeties to access test configuration information

properties = grinder.getProperties()

 

# The description is a property (instead of a hardcoded string in this script)

test = Test(1, properties.get("javatest.description"))

 

# If the run mode is runOnce, the TestRunner class will

# run once.  Otherwise, if the run mode is continuous,

# the TestRunner class will run the test for at least

# the specified duration (but possibly longer)

runMode = properties.get("javatest.runMode")

#WriteMulitpleLittleFile.setParameters(dir, fileSize...)

if runMode == "continuous":

  # figure out how long to run the test

  m = int(properties.getProperty("javatest.durationMinutes", "0"))

  h = int(properties.getProperty("javatest.durationHours", "0"))

  d = int(properties.getProperty("javatest.durationDays", "0"))

  duration = timedelta(minutes=m,hours=h,days=d)

  grinder.logger.info("run mode is continuous, duration is " + str(duration))

elif runMode == "runOnce":

  grinder.logger.info("run mode is run once")

  duration = timedelta(minutes=0)

else:

  grinder.logger.info("run mode not set or not recongized, default to run once")

  duration = timedelta(minutes=0)

 

########################################

#

# The TestRunner class is used by The Grinder to perform the test

#

########################################

 

grinder.statistics.registerDataLogExpression("TestTime", "userLong4")

 

class TestRunner:

  def __call__(self):

    endTime = datetime.now() + duration

    notDone = True

    while notDone:

      notDone = datetime.now() < endTime

 

      os.environ['ORACLE_HOME'] = "/u03/Middleware/Oracle_IDM"

      from commands import getoutput

      result = getoutput( '/u03/Middleware/Oracle_IDM/bin/ldapsearch -a always -D cn=orcladmin -w welcome1 -p 3060 -b "" -s sub "objectclass=*" orcldirectoryversion ou=Groups Privilege, cn=OperationURLs,cn=DAS,cn=Products,cn=OracleContex

t,dc=cn,dc=oracle,dc=com')

      print result

 

  def recordTestTime(TestTime):

     grinder.statistics.forCurrentTest.setValue("userLong4", TestTime)

 

From: Gang Yan
Sent: 2016
420 11:16
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Hi Joel

I  add grinder.statistics to test script

 

grinder.statistics.registerDataLogExpression("TestTime", "userLong4")

 

def recordTestTime(TestTime):

grinder.statistics.forCurrentTest.setValue("userLong4", TestTime)

 

 

But still not test data result .

 

Thanks!

 

From: Joel Lucuik [[hidden email]]
Sent: 2016
420 10:50
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Yes.

Check the script I included. It provides an example

Joel

On Apr 19, 2016 9:43 PM, "Gang Yan" <[hidden email]> wrote:

Hi Joel

 

Thanks you reply!

 

I have question:  you mean add  grinder.statistics to test script? 

 

Thanks!

 

 

From: Joel Lucuik [mailto:[hidden email]]
Sent: 2016
419 19:36
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Hi all,

Just an update.

We solved this by realizing this was asynchronous, and that doesn't work well with Grinder.

So referencing this:

http://grinder.sourceforge.net/g3/script-gallery.html#jmsreceiver.py

..And using grinder.statistics for the reporting and queues to count received messages, and we send the times in the payload.

This is working well.

Joel

 

On Tue, Apr 19, 2016 at 6:12 AM, Gang Yan <[hidden email]> wrote:

Hi all:

 

I run  grinder testing LDAP stress test. But not test data after finishing test. See test data log:  Thanks!

 

more uapgv4041.us.oracle.com-0-data.log

Thread, Run, Test, Start time (ms since Epoch), Test time, Errors

 

more uapgv4041.us.oracle.com-0.log

2016-04-19 09:32:15,773 INFO  com-0 : The Grinder version 3.11

2016-04-19 09:32:15,778 INFO  com-0 : Java(TM) SE Runtime Environment 1.7.0_45-b35: Java HotSpot(TM) 64-Bit Server VM (24.45-b08, mixed mode) on Linux amd64 3.8.13-118.3.2.el6uek.x86_64

2016-04-19 09:32:15,781 INFO  com-0 : time zone is UTC (+0000)

2016-04-19 09:32:15,898 INFO  com-0 : worker process 0

2016-04-19 09:32:15,953 INFO  com-0 : instrumentation agents: byte code transforming instrumenter for Jython 2.5; byte code transforming instrumenter for Java

2016-04-19 09:32:18,611 INFO  com-0 : run mode is continuous, duration is 0:10:00

2016-04-19 09:32:18,611 INFO  com-0 : running "test_ldap.py" using Jython 2.5.3 (2.5:c56500f08d34+, Aug 13 2012, 14:54:35)

[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]

2016-04-19 09:32:18,658 INFO  com-0 thread-5: starting, will do 1 run

2016-04-19 09:32:18,658 INFO  com-0 thread-4: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-3: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-2: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-1: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-0: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-6: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-7: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 thread-8: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 thread-9: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 : start time is 1461058338660 ms since Epoch

2016-04-19 09:42:18,713 INFO  com-0 thread-9: finished 1 run

2016-04-19 09:42:18,713 INFO  com-0 thread-4: finished 1 run

2016-04-19 09:42:18,754 INFO  com-0 thread-5: finished 1 run

2016-04-19 09:42:18,788 INFO  com-0 thread-1: finished 1 run

2016-04-19 09:42:18,842 INFO  com-0 thread-8: finished 1 run

2016-04-19 09:42:18,843 INFO  com-0 thread-6: finished 1 run

2016-04-19 09:42:18,871 INFO  com-0 thread-2: finished 1 run

2016-04-19 09:42:18,888 INFO  com-0 thread-3: finished 1 run

2016-04-19 09:42:18,928 INFO  com-0 thread-7: finished 1 run

2016-04-19 09:42:18,930 INFO  com-0 thread-0: finished 1 run

2016-04-19 09:42:18,930 INFO  com-0 : elapsed time is 600270 ms

2016-04-19 09:42:18,930 INFO  com-0 : Final statistics for this process:

2016-04-19 09:42:18,937 INFO  com-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.

 

 

My test script:

 

more test_ldap.py

# The sorting test supports a configurable array length.

# It runs the JavaTest.sort method of the JavaTest class.

 

from net.grinder.script.Grinder import grinder

from net.grinder.script import Test

from datetime import datetime

from datetime import timedelta

import os

import sys

 

########################################

#

# main body of test script starts here

#

########################################

 

# Get the propeties to access test configuration information

properties = grinder.getProperties()

 

# The description is a property (instead of a hardcoded string in this script)

test = Test(1, properties.get("javatest.description"))

 

# select the method for which to collect information

#test.record(WriteMulitpleLittleFile.write)

 

# initialize data for compressing

#fileName = properties.get("javatest.fileToCompress")

#grinder.logger.info("data file to compress is " + fileName)

#JavaTest.initializeCompression(fileName)

 

# If the run mode is runOnce, the TestRunner class will

# run once.  Otherwise, if the run mode is continuous,

# the TestRunner class will run the test for at least

# the specified duration (but possibly longer)

runMode = properties.get("javatest.runMode")

#WriteMulitpleLittleFile.setParameters(dir, fileSize...)

if runMode == "continuous":

  # figure out how long to run the test

  m = int(properties.getProperty("javatest.durationMinutes", "0"))

  h = int(properties.getProperty("javatest.durationHours", "0"))

  d = int(properties.getProperty("javatest.durationDays", "0"))

  duration = timedelta(minutes=m,hours=h,days=d)

  grinder.logger.info("run mode is continuous, duration is " + str(duration))

elif runMode == "runOnce":

  grinder.logger.info("run mode is run once")

  duration = timedelta(minutes=0)

else:

  grinder.logger.info("run mode not set or not recongized, default to run once")

  duration = timedelta(minutes=0)

 

########################################

#

# The TestRunner class is used by The Grinder to perform the test

#

########################################

 

class TestRunner:

  def __call__(self):

    endTime = datetime.now() + duration

    notDone = True

    while notDone:

      os.environ['ORACLE_HOME'] = "/u03/Middleware/Oracle_IDM"

 

      from commands import getoutput

      result = getoutput( '/u03/Middleware/Oracle_IDM/bin/ldapsearch -a always -D cn=orcladmin -w welcome1 -p 3060 -b "" -s sub "objectclass=*" orcldirectoryversion ou=Groups Privilege, cn=Operatio

nURLs,cn=DAS,cn=Products,cn=OracleContext,dc=cn,dc=oracle,dc=com')

      print result

      notDone = datetime.now() < endTime

 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use

 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grinder test result not data

Joel Lucuik
Try grinder.statistics.registerSummaryExpression("column name", "userLong4")

On Wed, Apr 20, 2016 at 1:24 AM, Gang Yan <[hidden email]> wrote:

Test script:

 

# The sorting test supports a configurable array length.

# It runs the JavaTest.sort method of the JavaTest class.

 

from net.grinder.script.Grinder import grinder

from net.grinder.script import Test

from datetime import datetime

from datetime import timedelta

import os

import sys

 

########################################

#

# main body of test script starts here

#

########################################

 

# Get the propeties to access test configuration information

properties = grinder.getProperties()

 

# The description is a property (instead of a hardcoded string in this script)

test = Test(1, properties.get("javatest.description"))

 

# If the run mode is runOnce, the TestRunner class will

# run once.  Otherwise, if the run mode is continuous,

# the TestRunner class will run the test for at least

# the specified duration (but possibly longer)

runMode = properties.get("javatest.runMode")

#WriteMulitpleLittleFile.setParameters(dir, fileSize...)

if runMode == "continuous":

  # figure out how long to run the test

  m = int(properties.getProperty("javatest.durationMinutes", "0"))

  h = int(properties.getProperty("javatest.durationHours", "0"))

  d = int(properties.getProperty("javatest.durationDays", "0"))

  duration = timedelta(minutes=m,hours=h,days=d)

  grinder.logger.info("run mode is continuous, duration is " + str(duration))

elif runMode == "runOnce":

  grinder.logger.info("run mode is run once")

  duration = timedelta(minutes=0)

else:

  grinder.logger.info("run mode not set or not recongized, default to run once")

  duration = timedelta(minutes=0)

 

########################################

#

# The TestRunner class is used by The Grinder to perform the test

#

########################################

 

grinder.statistics.registerDataLogExpression("TestTime", "userLong4")

 

class TestRunner:

  def __call__(self):

    endTime = datetime.now() + duration

    notDone = True

    while notDone:

      notDone = datetime.now() < endTime

 

      os.environ['ORACLE_HOME'] = "/u03/Middleware/Oracle_IDM"

      from commands import getoutput

      result = getoutput( '/u03/Middleware/Oracle_IDM/bin/ldapsearch -a always -D cn=orcladmin -w welcome1 -p 3060 -b "" -s sub "objectclass=*" orcldirectoryversion ou=Groups Privilege, cn=OperationURLs,cn=DAS,cn=Products,cn=OracleContex

t,dc=cn,dc=oracle,dc=com')

      print result

 

  def recordTestTime(TestTime):

     grinder.statistics.forCurrentTest.setValue("userLong4", TestTime)

 

From: Gang Yan
Sent: 2016
420 11:16
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Hi Joel

I  add grinder.statistics to test script

 

grinder.statistics.registerDataLogExpression("TestTime", "userLong4")

 

def recordTestTime(TestTime):

grinder.statistics.forCurrentTest.setValue("userLong4", TestTime)

 

 

But still not test data result .

 

Thanks!

 

From: Joel Lucuik [[hidden email]]
Sent: 2016
420 10:50
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Yes.

Check the script I included. It provides an example

Joel

On Apr 19, 2016 9:43 PM, "Gang Yan" <[hidden email]> wrote:

Hi Joel

 

Thanks you reply!

 

I have question:  you mean add  grinder.statistics to test script? 

 

Thanks!

 

 

From: Joel Lucuik [mailto:[hidden email]]
Sent: 2016
419 19:36
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Hi all,

Just an update.

We solved this by realizing this was asynchronous, and that doesn't work well with Grinder.

So referencing this:

http://grinder.sourceforge.net/g3/script-gallery.html#jmsreceiver.py

..And using grinder.statistics for the reporting and queues to count received messages, and we send the times in the payload.

This is working well.

Joel

 

On Tue, Apr 19, 2016 at 6:12 AM, Gang Yan <[hidden email]> wrote:

Hi all:

 

I run  grinder testing LDAP stress test. But not test data after finishing test. See test data log:  Thanks!

 

more uapgv4041.us.oracle.com-0-data.log

Thread, Run, Test, Start time (ms since Epoch), Test time, Errors

 

more uapgv4041.us.oracle.com-0.log

2016-04-19 09:32:15,773 INFO  com-0 : The Grinder version 3.11

2016-04-19 09:32:15,778 INFO  com-0 : Java(TM) SE Runtime Environment 1.7.0_45-b35: Java HotSpot(TM) 64-Bit Server VM (24.45-b08, mixed mode) on Linux amd64 3.8.13-118.3.2.el6uek.x86_64

2016-04-19 09:32:15,781 INFO  com-0 : time zone is UTC (+0000)

2016-04-19 09:32:15,898 INFO  com-0 : worker process 0

2016-04-19 09:32:15,953 INFO  com-0 : instrumentation agents: byte code transforming instrumenter for Jython 2.5; byte code transforming instrumenter for Java

2016-04-19 09:32:18,611 INFO  com-0 : run mode is continuous, duration is 0:10:00

2016-04-19 09:32:18,611 INFO  com-0 : running "test_ldap.py" using Jython 2.5.3 (2.5:c56500f08d34+, Aug 13 2012, 14:54:35)

[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]

2016-04-19 09:32:18,658 INFO  com-0 thread-5: starting, will do 1 run

2016-04-19 09:32:18,658 INFO  com-0 thread-4: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-3: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-2: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-1: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-0: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-6: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-7: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 thread-8: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 thread-9: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 : start time is 1461058338660 ms since Epoch

2016-04-19 09:42:18,713 INFO  com-0 thread-9: finished 1 run

2016-04-19 09:42:18,713 INFO  com-0 thread-4: finished 1 run

2016-04-19 09:42:18,754 INFO  com-0 thread-5: finished 1 run

2016-04-19 09:42:18,788 INFO  com-0 thread-1: finished 1 run

2016-04-19 09:42:18,842 INFO  com-0 thread-8: finished 1 run

2016-04-19 09:42:18,843 INFO  com-0 thread-6: finished 1 run

2016-04-19 09:42:18,871 INFO  com-0 thread-2: finished 1 run

2016-04-19 09:42:18,888 INFO  com-0 thread-3: finished 1 run

2016-04-19 09:42:18,928 INFO  com-0 thread-7: finished 1 run

2016-04-19 09:42:18,930 INFO  com-0 thread-0: finished 1 run

2016-04-19 09:42:18,930 INFO  com-0 : elapsed time is 600270 ms

2016-04-19 09:42:18,930 INFO  com-0 : Final statistics for this process:

2016-04-19 09:42:18,937 INFO  com-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.

 

 

My test script:

 

more test_ldap.py

# The sorting test supports a configurable array length.

# It runs the JavaTest.sort method of the JavaTest class.

 

from net.grinder.script.Grinder import grinder

from net.grinder.script import Test

from datetime import datetime

from datetime import timedelta

import os

import sys

 

########################################

#

# main body of test script starts here

#

########################################

 

# Get the propeties to access test configuration information

properties = grinder.getProperties()

 

# The description is a property (instead of a hardcoded string in this script)

test = Test(1, properties.get("javatest.description"))

 

# select the method for which to collect information

#test.record(WriteMulitpleLittleFile.write)

 

# initialize data for compressing

#fileName = properties.get("javatest.fileToCompress")

#grinder.logger.info("data file to compress is " + fileName)

#JavaTest.initializeCompression(fileName)

 

# If the run mode is runOnce, the TestRunner class will

# run once.  Otherwise, if the run mode is continuous,

# the TestRunner class will run the test for at least

# the specified duration (but possibly longer)

runMode = properties.get("javatest.runMode")

#WriteMulitpleLittleFile.setParameters(dir, fileSize...)

if runMode == "continuous":

  # figure out how long to run the test

  m = int(properties.getProperty("javatest.durationMinutes", "0"))

  h = int(properties.getProperty("javatest.durationHours", "0"))

  d = int(properties.getProperty("javatest.durationDays", "0"))

  duration = timedelta(minutes=m,hours=h,days=d)

  grinder.logger.info("run mode is continuous, duration is " + str(duration))

elif runMode == "runOnce":

  grinder.logger.info("run mode is run once")

  duration = timedelta(minutes=0)

else:

  grinder.logger.info("run mode not set or not recongized, default to run once")

  duration = timedelta(minutes=0)

 

########################################

#

# The TestRunner class is used by The Grinder to perform the test

#

########################################

 

class TestRunner:

  def __call__(self):

    endTime = datetime.now() + duration

    notDone = True

    while notDone:

      os.environ['ORACLE_HOME'] = "/u03/Middleware/Oracle_IDM"

 

      from commands import getoutput

      result = getoutput( '/u03/Middleware/Oracle_IDM/bin/ldapsearch -a always -D cn=orcladmin -w welcome1 -p 3060 -b "" -s sub "objectclass=*" orcldirectoryversion ou=Groups Privilege, cn=Operatio

nURLs,cn=DAS,cn=Products,cn=OracleContext,dc=cn,dc=oracle,dc=com')

      print result

      notDone = datetime.now() < endTime

 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use

 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use



------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grinder test result not data

Gang Yan

Hi Joel

I try grinder.statistics.registerSummaryExpression, but still error:

Thread, Run, Test, Start time (ms since Epoch), Test time, Errors

Test script:

grinder.statistics.registerSummaryExpression("connTimeout", "userLong4")

class TestRunner:
def __call__(self):
endTime = datetime.now() + duration
notDone = True
while notDone:
notDone = datetime.now() < endTime

os.environ['ORACLE_HOME'] = "/u03/Middleware/Oracle_IDM"
from commands import getoutput
result = getoutput( '/u03/Middleware/Oracle_IDM/bin/ldapsearch -a always -D cn=orcladmin -w welcome1 -p 3060 -b "" -s sub "objectclass=*" orcldirectoryversion ou=Groups Privilege, cn=Operatio
nURLs,cn=DAS,cn=Products,cn=OracleContext,dc=cn,dc=oracle,dc=com')
print result

def recordconnTimeout(connTimeout):
grinder.statistics.forCurrentTest.setValue("userLong4", connTimeout)

 

 

 

From: Joel Lucuik [mailto:[hidden email]]
Sent: 2016
421 3:02
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Try grinder.statistics.registerSummaryExpression("column name", "userLong4")

 

On Wed, Apr 20, 2016 at 1:24 AM, Gang Yan <[hidden email]> wrote:

Test script:

 

# The sorting test supports a configurable array length.

# It runs the JavaTest.sort method of the JavaTest class.

 

from net.grinder.script.Grinder import grinder

from net.grinder.script import Test

from datetime import datetime

from datetime import timedelta

import os

import sys

 

########################################

#

# main body of test script starts here

#

########################################

 

# Get the propeties to access test configuration information

properties = grinder.getProperties()

 

# The description is a property (instead of a hardcoded string in this script)

test = Test(1, properties.get("javatest.description"))

 

# If the run mode is runOnce, the TestRunner class will

# run once.  Otherwise, if the run mode is continuous,

# the TestRunner class will run the test for at least

# the specified duration (but possibly longer)

runMode = properties.get("javatest.runMode")

#WriteMulitpleLittleFile.setParameters(dir, fileSize...)

if runMode == "continuous":

  # figure out how long to run the test

  m = int(properties.getProperty("javatest.durationMinutes", "0"))

  h = int(properties.getProperty("javatest.durationHours", "0"))

  d = int(properties.getProperty("javatest.durationDays", "0"))

  duration = timedelta(minutes=m,hours=h,days=d)

  grinder.logger.info("run mode is continuous, duration is " + str(duration))

elif runMode == "runOnce":

  grinder.logger.info("run mode is run once")

  duration = timedelta(minutes=0)

else:

  grinder.logger.info("run mode not set or not recongized, default to run once")

  duration = timedelta(minutes=0)

 

########################################

#

# The TestRunner class is used by The Grinder to perform the test

#

########################################

 

grinder.statistics.registerDataLogExpression("TestTime", "userLong4")

 

class TestRunner:

  def __call__(self):

    endTime = datetime.now() + duration

    notDone = True

    while notDone:

      notDone = datetime.now() < endTime

 

      os.environ['ORACLE_HOME'] = "/u03/Middleware/Oracle_IDM"

      from commands import getoutput

      result = getoutput( '/u03/Middleware/Oracle_IDM/bin/ldapsearch -a always -D cn=orcladmin -w welcome1 -p 3060 -b "" -s sub "objectclass=*" orcldirectoryversion ou=Groups Privilege, cn=OperationURLs,cn=DAS,cn=Products,cn=OracleContex

t,dc=cn,dc=oracle,dc=com')

      print result

 

  def recordTestTime(TestTime):

     grinder.statistics.forCurrentTest.setValue("userLong4", TestTime)

 

From: Gang Yan
Sent: 2016
420 11:16
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Hi Joel

I  add grinder.statistics to test script

 

grinder.statistics.registerDataLogExpression("TestTime", "userLong4")

 

def recordTestTime(TestTime):

grinder.statistics.forCurrentTest.setValue("userLong4", TestTime)

 

 

But still not test data result .

 

Thanks!

 

From: Joel Lucuik [[hidden email]]
Sent: 2016
420 10:50
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Yes.

Check the script I included. It provides an example

Joel

On Apr 19, 2016 9:43 PM, "Gang Yan" <[hidden email]> wrote:

Hi Joel

 

Thanks you reply!

 

I have question:  you mean add  grinder.statistics to test script? 

 

Thanks!

 

 

From: Joel Lucuik [mailto:[hidden email]]
Sent: 2016
419 19:36
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Hi all,

Just an update.

We solved this by realizing this was asynchronous, and that doesn't work well with Grinder.

So referencing this:

http://grinder.sourceforge.net/g3/script-gallery.html#jmsreceiver.py

..And using grinder.statistics for the reporting and queues to count received messages, and we send the times in the payload.

This is working well.

Joel

 

On Tue, Apr 19, 2016 at 6:12 AM, Gang Yan <[hidden email]> wrote:

Hi all:

 

I run  grinder testing LDAP stress test. But not test data after finishing test. See test data log:  Thanks!

 

more uapgv4041.us.oracle.com-0-data.log

Thread, Run, Test, Start time (ms since Epoch), Test time, Errors

 

more uapgv4041.us.oracle.com-0.log

2016-04-19 09:32:15,773 INFO  com-0 : The Grinder version 3.11

2016-04-19 09:32:15,778 INFO  com-0 : Java(TM) SE Runtime Environment 1.7.0_45-b35: Java HotSpot(TM) 64-Bit Server VM (24.45-b08, mixed mode) on Linux amd64 3.8.13-118.3.2.el6uek.x86_64

2016-04-19 09:32:15,781 INFO  com-0 : time zone is UTC (+0000)

2016-04-19 09:32:15,898 INFO  com-0 : worker process 0

2016-04-19 09:32:15,953 INFO  com-0 : instrumentation agents: byte code transforming instrumenter for Jython 2.5; byte code transforming instrumenter for Java

2016-04-19 09:32:18,611 INFO  com-0 : run mode is continuous, duration is 0:10:00

2016-04-19 09:32:18,611 INFO  com-0 : running "test_ldap.py" using Jython 2.5.3 (2.5:c56500f08d34+, Aug 13 2012, 14:54:35)

[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]

2016-04-19 09:32:18,658 INFO  com-0 thread-5: starting, will do 1 run

2016-04-19 09:32:18,658 INFO  com-0 thread-4: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-3: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-2: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-1: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-0: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-6: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-7: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 thread-8: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 thread-9: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 : start time is 1461058338660 ms since Epoch

2016-04-19 09:42:18,713 INFO  com-0 thread-9: finished 1 run

2016-04-19 09:42:18,713 INFO  com-0 thread-4: finished 1 run

2016-04-19 09:42:18,754 INFO  com-0 thread-5: finished 1 run

2016-04-19 09:42:18,788 INFO  com-0 thread-1: finished 1 run

2016-04-19 09:42:18,842 INFO  com-0 thread-8: finished 1 run

2016-04-19 09:42:18,843 INFO  com-0 thread-6: finished 1 run

2016-04-19 09:42:18,871 INFO  com-0 thread-2: finished 1 run

2016-04-19 09:42:18,888 INFO  com-0 thread-3: finished 1 run

2016-04-19 09:42:18,928 INFO  com-0 thread-7: finished 1 run

2016-04-19 09:42:18,930 INFO  com-0 thread-0: finished 1 run

2016-04-19 09:42:18,930 INFO  com-0 : elapsed time is 600270 ms

2016-04-19 09:42:18,930 INFO  com-0 : Final statistics for this process:

2016-04-19 09:42:18,937 INFO  com-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.

 

 

My test script:

 

more test_ldap.py

# The sorting test supports a configurable array length.

# It runs the JavaTest.sort method of the JavaTest class.

 

from net.grinder.script.Grinder import grinder

from net.grinder.script import Test

from datetime import datetime

from datetime import timedelta

import os

import sys

 

########################################

#

# main body of test script starts here

#

########################################

 

# Get the propeties to access test configuration information

properties = grinder.getProperties()

 

# The description is a property (instead of a hardcoded string in this script)

test = Test(1, properties.get("javatest.description"))

 

# select the method for which to collect information

#test.record(WriteMulitpleLittleFile.write)

 

# initialize data for compressing

#fileName = properties.get("javatest.fileToCompress")

#grinder.logger.info("data file to compress is " + fileName)

#JavaTest.initializeCompression(fileName)

 

# If the run mode is runOnce, the TestRunner class will

# run once.  Otherwise, if the run mode is continuous,

# the TestRunner class will run the test for at least

# the specified duration (but possibly longer)

runMode = properties.get("javatest.runMode")

#WriteMulitpleLittleFile.setParameters(dir, fileSize...)

if runMode == "continuous":

  # figure out how long to run the test

  m = int(properties.getProperty("javatest.durationMinutes", "0"))

  h = int(properties.getProperty("javatest.durationHours", "0"))

  d = int(properties.getProperty("javatest.durationDays", "0"))

  duration = timedelta(minutes=m,hours=h,days=d)

  grinder.logger.info("run mode is continuous, duration is " + str(duration))

elif runMode == "runOnce":

  grinder.logger.info("run mode is run once")

  duration = timedelta(minutes=0)

else:

  grinder.logger.info("run mode not set or not recongized, default to run once")

  duration = timedelta(minutes=0)

 

########################################

#

# The TestRunner class is used by The Grinder to perform the test

#

########################################

 

class TestRunner:

  def __call__(self):

    endTime = datetime.now() + duration

    notDone = True

    while notDone:

      os.environ['ORACLE_HOME'] = "/u03/Middleware/Oracle_IDM"

 

      from commands import getoutput

      result = getoutput( '/u03/Middleware/Oracle_IDM/bin/ldapsearch -a always -D cn=orcladmin -w welcome1 -p 3060 -b "" -s sub "objectclass=*" orcldirectoryversion ou=Groups Privilege, cn=Operatio

nURLs,cn=DAS,cn=Products,cn=OracleContext,dc=cn,dc=oracle,dc=com')

      print result

      notDone = datetime.now() < endTime

 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use

 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use

 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grinder test result not data

Joel Lucuik
In reply to this post by Gang Yan
1. What is the error?

2. I suggest you compare your code to the example I posted from sourceforge.

Off the top of my head, I don't see anyone calling "recordconnTimeout"

Joel

On Wed, Apr 20, 2016 at 10:41 PM, Gang Yan <[hidden email]> wrote:

Hi Joel

I try grinder.statistics.registerSummaryExpression, but still error:

Thread, Run, Test, Start time (ms since Epoch), Test time, Errors

Test script:

grinder.statistics.registerSummaryExpression("connTimeout", "userLong4")

class TestRunner:
def __call__(self):
endTime = datetime.now() + duration
notDone = True
while notDone:
notDone = datetime.now() < endTime

os.environ['ORACLE_HOME'] = "/u03/Middleware/Oracle_IDM"
from commands import getoutput
result = getoutput( '/u03/Middleware/Oracle_IDM/bin/ldapsearch -a always -D cn=orcladmin -w welcome1 -p 3060 -b "" -s sub "objectclass=*" orcldirectoryversion ou=Groups Privilege, cn=Operatio
nURLs,cn=DAS,cn=Products,cn=OracleContext,dc=cn,dc=oracle,dc=com')
print result

def recordconnTimeout(connTimeout):
grinder.statistics.forCurrentTest.setValue("userLong4", connTimeout)

 

 

 

From: Joel Lucuik [mailto:[hidden email]]
Sent: 2016
421 3:02
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Try grinder.statistics.registerSummaryExpression("column name", "userLong4")

 

On Wed, Apr 20, 2016 at 1:24 AM, Gang Yan <[hidden email]> wrote:

Test script:

 

# The sorting test supports a configurable array length.

# It runs the JavaTest.sort method of the JavaTest class.

 

from net.grinder.script.Grinder import grinder

from net.grinder.script import Test

from datetime import datetime

from datetime import timedelta

import os

import sys

 

########################################

#

# main body of test script starts here

#

########################################

 

# Get the propeties to access test configuration information

properties = grinder.getProperties()

 

# The description is a property (instead of a hardcoded string in this script)

test = Test(1, properties.get("javatest.description"))

 

# If the run mode is runOnce, the TestRunner class will

# run once.  Otherwise, if the run mode is continuous,

# the TestRunner class will run the test for at least

# the specified duration (but possibly longer)

runMode = properties.get("javatest.runMode")

#WriteMulitpleLittleFile.setParameters(dir, fileSize...)

if runMode == "continuous":

  # figure out how long to run the test

  m = int(properties.getProperty("javatest.durationMinutes", "0"))

  h = int(properties.getProperty("javatest.durationHours", "0"))

  d = int(properties.getProperty("javatest.durationDays", "0"))

  duration = timedelta(minutes=m,hours=h,days=d)

  grinder.logger.info("run mode is continuous, duration is " + str(duration))

elif runMode == "runOnce":

  grinder.logger.info("run mode is run once")

  duration = timedelta(minutes=0)

else:

  grinder.logger.info("run mode not set or not recongized, default to run once")

  duration = timedelta(minutes=0)

 

########################################

#

# The TestRunner class is used by The Grinder to perform the test

#

########################################

 

grinder.statistics.registerDataLogExpression("TestTime", "userLong4")

 

class TestRunner:

  def __call__(self):

    endTime = datetime.now() + duration

    notDone = True

    while notDone:

      notDone = datetime.now() < endTime

 

      os.environ['ORACLE_HOME'] = "/u03/Middleware/Oracle_IDM"

      from commands import getoutput

      result = getoutput( '/u03/Middleware/Oracle_IDM/bin/ldapsearch -a always -D cn=orcladmin -w welcome1 -p 3060 -b "" -s sub "objectclass=*" orcldirectoryversion ou=Groups Privilege, cn=OperationURLs,cn=DAS,cn=Products,cn=OracleContex

t,dc=cn,dc=oracle,dc=com')

      print result

 

  def recordTestTime(TestTime):

     grinder.statistics.forCurrentTest.setValue("userLong4", TestTime)

 

From: Gang Yan
Sent: 2016
420 11:16
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Hi Joel

I  add grinder.statistics to test script

 

grinder.statistics.registerDataLogExpression("TestTime", "userLong4")

 

def recordTestTime(TestTime):

grinder.statistics.forCurrentTest.setValue("userLong4", TestTime)

 

 

But still not test data result .

 

Thanks!

 

From: Joel Lucuik [[hidden email]]
Sent: 2016
420 10:50
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Yes.

Check the script I included. It provides an example

Joel

On Apr 19, 2016 9:43 PM, "Gang Yan" <[hidden email]> wrote:

Hi Joel

 

Thanks you reply!

 

I have question:  you mean add  grinder.statistics to test script? 

 

Thanks!

 

 

From: Joel Lucuik [mailto:[hidden email]]
Sent: 2016
419 19:36
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Hi all,

Just an update.

We solved this by realizing this was asynchronous, and that doesn't work well with Grinder.

So referencing this:

http://grinder.sourceforge.net/g3/script-gallery.html#jmsreceiver.py

..And using grinder.statistics for the reporting and queues to count received messages, and we send the times in the payload.

This is working well.

Joel

 

On Tue, Apr 19, 2016 at 6:12 AM, Gang Yan <[hidden email]> wrote:

Hi all:

 

I run  grinder testing LDAP stress test. But not test data after finishing test. See test data log:  Thanks!

 

more uapgv4041.us.oracle.com-0-data.log

Thread, Run, Test, Start time (ms since Epoch), Test time, Errors

 

more uapgv4041.us.oracle.com-0.log

2016-04-19 09:32:15,773 INFO  com-0 : The Grinder version 3.11

2016-04-19 09:32:15,778 INFO  com-0 : Java(TM) SE Runtime Environment 1.7.0_45-b35: Java HotSpot(TM) 64-Bit Server VM (24.45-b08, mixed mode) on Linux amd64 3.8.13-118.3.2.el6uek.x86_64

2016-04-19 09:32:15,781 INFO  com-0 : time zone is UTC (+0000)

2016-04-19 09:32:15,898 INFO  com-0 : worker process 0

2016-04-19 09:32:15,953 INFO  com-0 : instrumentation agents: byte code transforming instrumenter for Jython 2.5; byte code transforming instrumenter for Java

2016-04-19 09:32:18,611 INFO  com-0 : run mode is continuous, duration is 0:10:00

2016-04-19 09:32:18,611 INFO  com-0 : running "test_ldap.py" using Jython 2.5.3 (2.5:c56500f08d34+, Aug 13 2012, 14:54:35)

[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]

2016-04-19 09:32:18,658 INFO  com-0 thread-5: starting, will do 1 run

2016-04-19 09:32:18,658 INFO  com-0 thread-4: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-3: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-2: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-1: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-0: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-6: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-7: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 thread-8: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 thread-9: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 : start time is 1461058338660 ms since Epoch

2016-04-19 09:42:18,713 INFO  com-0 thread-9: finished 1 run

2016-04-19 09:42:18,713 INFO  com-0 thread-4: finished 1 run

2016-04-19 09:42:18,754 INFO  com-0 thread-5: finished 1 run

2016-04-19 09:42:18,788 INFO  com-0 thread-1: finished 1 run

2016-04-19 09:42:18,842 INFO  com-0 thread-8: finished 1 run

2016-04-19 09:42:18,843 INFO  com-0 thread-6: finished 1 run

2016-04-19 09:42:18,871 INFO  com-0 thread-2: finished 1 run

2016-04-19 09:42:18,888 INFO  com-0 thread-3: finished 1 run

2016-04-19 09:42:18,928 INFO  com-0 thread-7: finished 1 run

2016-04-19 09:42:18,930 INFO  com-0 thread-0: finished 1 run

2016-04-19 09:42:18,930 INFO  com-0 : elapsed time is 600270 ms

2016-04-19 09:42:18,930 INFO  com-0 : Final statistics for this process:

2016-04-19 09:42:18,937 INFO  com-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.

 

 

My test script:

 

more test_ldap.py

# The sorting test supports a configurable array length.

# It runs the JavaTest.sort method of the JavaTest class.

 

from net.grinder.script.Grinder import grinder

from net.grinder.script import Test

from datetime import datetime

from datetime import timedelta

import os

import sys

 

########################################

#

# main body of test script starts here

#

########################################

 

# Get the propeties to access test configuration information

properties = grinder.getProperties()

 

# The description is a property (instead of a hardcoded string in this script)

test = Test(1, properties.get("javatest.description"))

 

# select the method for which to collect information

#test.record(WriteMulitpleLittleFile.write)

 

# initialize data for compressing

#fileName = properties.get("javatest.fileToCompress")

#grinder.logger.info("data file to compress is " + fileName)

#JavaTest.initializeCompression(fileName)

 

# If the run mode is runOnce, the TestRunner class will

# run once.  Otherwise, if the run mode is continuous,

# the TestRunner class will run the test for at least

# the specified duration (but possibly longer)

runMode = properties.get("javatest.runMode")

#WriteMulitpleLittleFile.setParameters(dir, fileSize...)

if runMode == "continuous":

  # figure out how long to run the test

  m = int(properties.getProperty("javatest.durationMinutes", "0"))

  h = int(properties.getProperty("javatest.durationHours", "0"))

  d = int(properties.getProperty("javatest.durationDays", "0"))

  duration = timedelta(minutes=m,hours=h,days=d)

  grinder.logger.info("run mode is continuous, duration is " + str(duration))

elif runMode == "runOnce":

  grinder.logger.info("run mode is run once")

  duration = timedelta(minutes=0)

else:

  grinder.logger.info("run mode not set or not recongized, default to run once")

  duration = timedelta(minutes=0)

 

########################################

#

# The TestRunner class is used by The Grinder to perform the test

#

########################################

 

class TestRunner:

  def __call__(self):

    endTime = datetime.now() + duration

    notDone = True

    while notDone:

      os.environ['ORACLE_HOME'] = "/u03/Middleware/Oracle_IDM"

 

      from commands import getoutput

      result = getoutput( '/u03/Middleware/Oracle_IDM/bin/ldapsearch -a always -D cn=orcladmin -w welcome1 -p 3060 -b "" -s sub "objectclass=*" orcldirectoryversion ou=Groups Privilege, cn=Operatio

nURLs,cn=DAS,cn=Products,cn=OracleContext,dc=cn,dc=oracle,dc=com')

      print result

      notDone = datetime.now() < endTime

 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use

 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use

 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use



------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grinder test result not data

Joel Lucuik
In reply to this post by Gang Yan
I noticed an error in the scripts.

I am using grinder.statistics.registerSummaryExpression(
              "Mean delivery time", "(/ userLong1 (count timedTests))")

Note the api change

http://grinder.sourceforge.net/g3/script-javadoc/net/grinder/script/Statistics.html#registerSummaryExpression%28java.lang.String,%20java.lang.String%29

Joel

On Wed, Apr 20, 2016 at 10:41 PM, Gang Yan <[hidden email]> wrote:

Hi Joel

I try grinder.statistics.registerSummaryExpression, but still error:

Thread, Run, Test, Start time (ms since Epoch), Test time, Errors

Test script:

grinder.statistics.registerSummaryExpression("connTimeout", "userLong4")

class TestRunner:
def __call__(self):
endTime = datetime.now() + duration
notDone = True
while notDone:
notDone = datetime.now() < endTime

os.environ['ORACLE_HOME'] = "/u03/Middleware/Oracle_IDM"
from commands import getoutput
result = getoutput( '/u03/Middleware/Oracle_IDM/bin/ldapsearch -a always -D cn=orcladmin -w welcome1 -p 3060 -b "" -s sub "objectclass=*" orcldirectoryversion ou=Groups Privilege, cn=Operatio
nURLs,cn=DAS,cn=Products,cn=OracleContext,dc=cn,dc=oracle,dc=com')
print result

def recordconnTimeout(connTimeout):
grinder.statistics.forCurrentTest.setValue("userLong4", connTimeout)

 

 

 

From: Joel Lucuik [mailto:[hidden email]]
Sent: 2016
421 3:02
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Try grinder.statistics.registerSummaryExpression("column name", "userLong4")

 

On Wed, Apr 20, 2016 at 1:24 AM, Gang Yan <[hidden email]> wrote:

Test script:

 

# The sorting test supports a configurable array length.

# It runs the JavaTest.sort method of the JavaTest class.

 

from net.grinder.script.Grinder import grinder

from net.grinder.script import Test

from datetime import datetime

from datetime import timedelta

import os

import sys

 

########################################

#

# main body of test script starts here

#

########################################

 

# Get the propeties to access test configuration information

properties = grinder.getProperties()

 

# The description is a property (instead of a hardcoded string in this script)

test = Test(1, properties.get("javatest.description"))

 

# If the run mode is runOnce, the TestRunner class will

# run once.  Otherwise, if the run mode is continuous,

# the TestRunner class will run the test for at least

# the specified duration (but possibly longer)

runMode = properties.get("javatest.runMode")

#WriteMulitpleLittleFile.setParameters(dir, fileSize...)

if runMode == "continuous":

  # figure out how long to run the test

  m = int(properties.getProperty("javatest.durationMinutes", "0"))

  h = int(properties.getProperty("javatest.durationHours", "0"))

  d = int(properties.getProperty("javatest.durationDays", "0"))

  duration = timedelta(minutes=m,hours=h,days=d)

  grinder.logger.info("run mode is continuous, duration is " + str(duration))

elif runMode == "runOnce":

  grinder.logger.info("run mode is run once")

  duration = timedelta(minutes=0)

else:

  grinder.logger.info("run mode not set or not recongized, default to run once")

  duration = timedelta(minutes=0)

 

########################################

#

# The TestRunner class is used by The Grinder to perform the test

#

########################################

 

grinder.statistics.registerDataLogExpression("TestTime", "userLong4")

 

class TestRunner:

  def __call__(self):

    endTime = datetime.now() + duration

    notDone = True

    while notDone:

      notDone = datetime.now() < endTime

 

      os.environ['ORACLE_HOME'] = "/u03/Middleware/Oracle_IDM"

      from commands import getoutput

      result = getoutput( '/u03/Middleware/Oracle_IDM/bin/ldapsearch -a always -D cn=orcladmin -w welcome1 -p 3060 -b "" -s sub "objectclass=*" orcldirectoryversion ou=Groups Privilege, cn=OperationURLs,cn=DAS,cn=Products,cn=OracleContex

t,dc=cn,dc=oracle,dc=com')

      print result

 

  def recordTestTime(TestTime):

     grinder.statistics.forCurrentTest.setValue("userLong4", TestTime)

 

From: Gang Yan
Sent: 2016
420 11:16
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Hi Joel

I  add grinder.statistics to test script

 

grinder.statistics.registerDataLogExpression("TestTime", "userLong4")

 

def recordTestTime(TestTime):

grinder.statistics.forCurrentTest.setValue("userLong4", TestTime)

 

 

But still not test data result .

 

Thanks!

 

From: Joel Lucuik [[hidden email]]
Sent: 2016
420 10:50
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Yes.

Check the script I included. It provides an example

Joel

On Apr 19, 2016 9:43 PM, "Gang Yan" <[hidden email]> wrote:

Hi Joel

 

Thanks you reply!

 

I have question:  you mean add  grinder.statistics to test script? 

 

Thanks!

 

 

From: Joel Lucuik [mailto:[hidden email]]
Sent: 2016
419 19:36
To: grinder-use
Subject: Re: [Grinder-use] Grinder test result not data

 

Hi all,

Just an update.

We solved this by realizing this was asynchronous, and that doesn't work well with Grinder.

So referencing this:

http://grinder.sourceforge.net/g3/script-gallery.html#jmsreceiver.py

..And using grinder.statistics for the reporting and queues to count received messages, and we send the times in the payload.

This is working well.

Joel

 

On Tue, Apr 19, 2016 at 6:12 AM, Gang Yan <[hidden email]> wrote:

Hi all:

 

I run  grinder testing LDAP stress test. But not test data after finishing test. See test data log:  Thanks!

 

more uapgv4041.us.oracle.com-0-data.log

Thread, Run, Test, Start time (ms since Epoch), Test time, Errors

 

more uapgv4041.us.oracle.com-0.log

2016-04-19 09:32:15,773 INFO  com-0 : The Grinder version 3.11

2016-04-19 09:32:15,778 INFO  com-0 : Java(TM) SE Runtime Environment 1.7.0_45-b35: Java HotSpot(TM) 64-Bit Server VM (24.45-b08, mixed mode) on Linux amd64 3.8.13-118.3.2.el6uek.x86_64

2016-04-19 09:32:15,781 INFO  com-0 : time zone is UTC (+0000)

2016-04-19 09:32:15,898 INFO  com-0 : worker process 0

2016-04-19 09:32:15,953 INFO  com-0 : instrumentation agents: byte code transforming instrumenter for Jython 2.5; byte code transforming instrumenter for Java

2016-04-19 09:32:18,611 INFO  com-0 : run mode is continuous, duration is 0:10:00

2016-04-19 09:32:18,611 INFO  com-0 : running "test_ldap.py" using Jython 2.5.3 (2.5:c56500f08d34+, Aug 13 2012, 14:54:35)

[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]

2016-04-19 09:32:18,658 INFO  com-0 thread-5: starting, will do 1 run

2016-04-19 09:32:18,658 INFO  com-0 thread-4: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-3: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-2: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-1: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-0: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-6: starting, will do 1 run

2016-04-19 09:32:18,659 INFO  com-0 thread-7: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 thread-8: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 thread-9: starting, will do 1 run

2016-04-19 09:32:18,660 INFO  com-0 : start time is 1461058338660 ms since Epoch

2016-04-19 09:42:18,713 INFO  com-0 thread-9: finished 1 run

2016-04-19 09:42:18,713 INFO  com-0 thread-4: finished 1 run

2016-04-19 09:42:18,754 INFO  com-0 thread-5: finished 1 run

2016-04-19 09:42:18,788 INFO  com-0 thread-1: finished 1 run

2016-04-19 09:42:18,842 INFO  com-0 thread-8: finished 1 run

2016-04-19 09:42:18,843 INFO  com-0 thread-6: finished 1 run

2016-04-19 09:42:18,871 INFO  com-0 thread-2: finished 1 run

2016-04-19 09:42:18,888 INFO  com-0 thread-3: finished 1 run

2016-04-19 09:42:18,928 INFO  com-0 thread-7: finished 1 run

2016-04-19 09:42:18,930 INFO  com-0 thread-0: finished 1 run

2016-04-19 09:42:18,930 INFO  com-0 : elapsed time is 600270 ms

2016-04-19 09:42:18,930 INFO  com-0 : Final statistics for this process:

2016-04-19 09:42:18,937 INFO  com-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.

 

 

My test script:

 

more test_ldap.py

# The sorting test supports a configurable array length.

# It runs the JavaTest.sort method of the JavaTest class.

 

from net.grinder.script.Grinder import grinder

from net.grinder.script import Test

from datetime import datetime

from datetime import timedelta

import os

import sys

 

########################################

#

# main body of test script starts here

#

########################################

 

# Get the propeties to access test configuration information

properties = grinder.getProperties()

 

# The description is a property (instead of a hardcoded string in this script)

test = Test(1, properties.get("javatest.description"))

 

# select the method for which to collect information

#test.record(WriteMulitpleLittleFile.write)

 

# initialize data for compressing

#fileName = properties.get("javatest.fileToCompress")

#grinder.logger.info("data file to compress is " + fileName)

#JavaTest.initializeCompression(fileName)

 

# If the run mode is runOnce, the TestRunner class will

# run once.  Otherwise, if the run mode is continuous,

# the TestRunner class will run the test for at least

# the specified duration (but possibly longer)

runMode = properties.get("javatest.runMode")

#WriteMulitpleLittleFile.setParameters(dir, fileSize...)

if runMode == "continuous":

  # figure out how long to run the test

  m = int(properties.getProperty("javatest.durationMinutes", "0"))

  h = int(properties.getProperty("javatest.durationHours", "0"))

  d = int(properties.getProperty("javatest.durationDays", "0"))

  duration = timedelta(minutes=m,hours=h,days=d)

  grinder.logger.info("run mode is continuous, duration is " + str(duration))

elif runMode == "runOnce":

  grinder.logger.info("run mode is run once")

  duration = timedelta(minutes=0)

else:

  grinder.logger.info("run mode not set or not recongized, default to run once")

  duration = timedelta(minutes=0)

 

########################################

#

# The TestRunner class is used by The Grinder to perform the test

#

########################################

 

class TestRunner:

  def __call__(self):

    endTime = datetime.now() + duration

    notDone = True

    while notDone:

      os.environ['ORACLE_HOME'] = "/u03/Middleware/Oracle_IDM"

 

      from commands import getoutput

      result = getoutput( '/u03/Middleware/Oracle_IDM/bin/ldapsearch -a always -D cn=orcladmin -w welcome1 -p 3060 -b "" -s sub "objectclass=*" orcldirectoryversion ou=Groups Privilege, cn=Operatio

nURLs,cn=DAS,cn=Products,cn=OracleContext,dc=cn,dc=oracle,dc=com')

      print result

      notDone = datetime.now() < endTime

 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use

 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use

 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use



------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use
Loading...