Quantcast

Has anyone added median to the summary statistics?

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

Has anyone added median to the summary statistics?

Darren Ball
Is it possible to add median to summary statistics?



------------------------------------------------------------------------------

_______________________________________________
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: Has anyone added median to the summary statistics?

Gary Mulder-3
Anything is possible, but the 99th, 99.9th and 99.99th percentiles might tell you more about the actual performance of your system.

Have a watch of this when you have a spare 45 minutes:


Regards,
Gary 

On 8 October 2015 at 05:17, Darren Ball <[hidden email]> wrote:
Is it possible to add median to summary statistics?



------------------------------------------------------------------------------

_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use



------------------------------------------------------------------------------

_______________________________________________
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: Has anyone added median to the summary statistics?

Darren Ball

Thanks Gary,
But I am not just satisfying myself with these numbers.  :)

I have requests for min, max, mode and median regardless of the fact that I think they may not matter.

I was just wondering if anyone has had luck getting these into summary stats.

On Oct 8, 2015 2:21 AM, "Gary Mulder" <[hidden email]> wrote:
Anything is possible, but the 99th, 99.9th and 99.99th percentiles might tell you more about the actual performance of your system.

Have a watch of this when you have a spare 45 minutes:


Regards,
Gary 

On 8 October 2015 at 05:17, Darren Ball <[hidden email]> wrote:
Is it possible to add median to summary statistics?



------------------------------------------------------------------------------

_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use



------------------------------------------------------------------------------

_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use


------------------------------------------------------------------------------

_______________________________________________
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

JDBC test script error" The result of 'TestRunner()' is not callable"

Gang Yan
In reply to this post by Darren Ball

Hi all :

 

I use JDBC.py script run  performance testing . grinder log info:

 

2015-10-14 18:42:40,132 ERROR com-0 thread-24: aborting thread - {}The result of 'TestRunner()' is not callable

net.grinder.scriptengine.jython.JythonScriptExecutionException: The result of 'TestRunner()' is not callable

        at net.grinder.scriptengine.jython.JythonScriptEngine.createWorkerRunnable(JythonScriptEngine.java:183) ~[grinder-core-3.11.jar:na]

        at net.grinder.engine.process.GrinderProcess$ThreadStarterImplementation$2.create(GrinderProcess.java:784) ~[grinder-core-3.11.jar:na]

        at net.grinder.engine.process.GrinderThread.run(GrinderThread.java:90) ~[grinder-core-3.11.jar:na]

        at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]

2015-10-14 18:42:40,132 ERROR com-0 thread-3: aborting thread - {}The result of 'TestRunner()' is not callable

net.grinder.scriptengine.jython.JythonScriptExecutionException: The result of 'TestRunner()' is not callable

        at net.grinder.scriptengine.jython.JythonScriptEngine.createWorkerRunnable(JythonScriptEngine.java:183) ~[grinder-core-3.11.jar:na]

        at net.grinder.engine.process.GrinderProcess$ThreadStarterImplementation$2.create(GrinderProcess.java:784) ~[grinder-core-3.11.jar:na]

        at net.grinder.engine.process.GrinderThread.run(GrinderThread.java:90) ~[grinder-core-3.11.jar:na]

        at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]

 

I modify script, but still  error. Please help check it.

 

I  test script :

 

# The sorting tes  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

from java.sql import DriverManager

from oracle.jdbc import OracleDriver

 

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

#

# 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"))

test = Test(2, 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

#

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

 

#test1 = Test(1, "Database insert")

test2 = Test(2, "Database query")

 

# Load the Oracle JDBC driver.

DriverManager.registerDriver(OracleDriver())

 

def getConnection():

    return DriverManager.getConnection(

        "jdbc:oracle:thin:@den00bvr.us.oracle.com:1521:orcl", "PBPUBLIC", "PBPUBLIC")

 

def ensureClosed(object):

    try: object.close()

    except: pass

 

# One time initialisation that cleans out old data.

connection = getConnection()

statement = connection.createStatement()

 

#try: statement.execute("drop table grinder_test1126")

#except: pass

 

#statement.execute("create table grinder_test1126(thread number, run number)")

 

ensureClosed(statement)

ensureClosed(connection)

 

class TestRunner:

   def __init__(self):

#        tid = grinder.threadNumber

 

#        if (grinder.threadNumber % 2 == 0):

#             Even threadNumber

#             Do insertStatement

#        else:

#             Odd threadNumber

#             Do queryStatement

 

#   def __call__(self):

#       self.testRunner()

 

        endTime = datetime.now() + duration

        notDone = True

        while notDone:

         connection = None

         insertStatement = None

         queryStatement = None

         notDone = datetime.now() < endTime

 

        try:

            connection = getConnection()

#           insertStatement = connection.createStatement()

            queryStatement = connection.createStatement()

 

#           test1.record(insertStatement)

#           insertStatement.execute("insert into grinder_test1126 values(%d, %d)" %

#                                   (grinder.threadNumber, grinder.runNumber))

 

            test2.record(queryStatement)

            queryStatement.execute("select * from employee")

 

        finally:

#           ensureClosed(insertStatement)

            ensureClosed(queryStatement)

            ensureClosed(connection)

 


------------------------------------------------------------------------------

_______________________________________________
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: JDBC test script error" The result of 'TestRunner()' is not callable"

Marc Holden
Hi Gang,

You need to uncomment out the __call__ method definition (line 189).  Grinder uses that method as the entry point for the worker processes.

-Marc

On Wed, Oct 14, 2015 at 6:57 AM Gang Yan <[hidden email]> wrote:

Hi all :

 

I use JDBC.py script run  performance testing . grinder log info:

 

2015-10-14 18:42:40,132 ERROR com-0 thread-24: aborting thread - {}The result of 'TestRunner()' is not callable

net.grinder.scriptengine.jython.JythonScriptExecutionException: The result of 'TestRunner()' is not callable

        at net.grinder.scriptengine.jython.JythonScriptEngine.createWorkerRunnable(JythonScriptEngine.java:183) ~[grinder-core-3.11.jar:na]

        at net.grinder.engine.process.GrinderProcess$ThreadStarterImplementation$2.create(GrinderProcess.java:784) ~[grinder-core-3.11.jar:na]

        at net.grinder.engine.process.GrinderThread.run(GrinderThread.java:90) ~[grinder-core-3.11.jar:na]

        at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]

2015-10-14 18:42:40,132 ERROR com-0 thread-3: aborting thread - {}The result of 'TestRunner()' is not callable

net.grinder.scriptengine.jython.JythonScriptExecutionException: The result of 'TestRunner()' is not callable

        at net.grinder.scriptengine.jython.JythonScriptEngine.createWorkerRunnable(JythonScriptEngine.java:183) ~[grinder-core-3.11.jar:na]

        at net.grinder.engine.process.GrinderProcess$ThreadStarterImplementation$2.create(GrinderProcess.java:784) ~[grinder-core-3.11.jar:na]

        at net.grinder.engine.process.GrinderThread.run(GrinderThread.java:90) ~[grinder-core-3.11.jar:na]

        at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]

 

I modify script, but still  error. Please help check it.

 

I  test script :

 

# The sorting tes  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

from java.sql import DriverManager

from oracle.jdbc import OracleDriver

 

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

#

# 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"))

test = Test(2, 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

#

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

 

#test1 = Test(1, "Database insert")

test2 = Test(2, "Database query")

 

# Load the Oracle JDBC driver.

DriverManager.registerDriver(OracleDriver())

 

def getConnection():

    return DriverManager.getConnection(

        "jdbc:oracle:thin:@den00bvr.us.oracle.com:1521:orcl", "PBPUBLIC", "PBPUBLIC")

 

def ensureClosed(object):

    try: object.close()

    except: pass

 

# One time initialisation that cleans out old data.

connection = getConnection()

statement = connection.createStatement()

 

#try: statement.execute("drop table grinder_test1126")

#except: pass

 

#statement.execute("create table grinder_test1126(thread number, run number)")

 

ensureClosed(statement)

ensureClosed(connection)

 

class TestRunner:

   def __init__(self):

#        tid = grinder.threadNumber

 

#        if (grinder.threadNumber % 2 == 0):

#             Even threadNumber

#             Do insertStatement

#        else:

#             Odd threadNumber

#             Do queryStatement

 

#   def __call__(self):

#       self.testRunner()

 

        endTime = datetime.now() + duration

        notDone = True

        while notDone:

         connection = None

         insertStatement = None

         queryStatement = None

         notDone = datetime.now() < endTime

 

        try:

            connection = getConnection()

#           insertStatement = connection.createStatement()

            queryStatement = connection.createStatement()

 

#           test1.record(insertStatement)

#           insertStatement.execute("insert into grinder_test1126 values(%d, %d)" %

#                                   (grinder.threadNumber, grinder.runNumber))

 

            test2.record(queryStatement)

            queryStatement.execute("select * from employee")

 

        finally:

#           ensureClosed(insertStatement)

            ensureClosed(queryStatement)

            ensureClosed(connection)

 

------------------------------------------------------------------------------
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use

------------------------------------------------------------------------------

_______________________________________________
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: JDBC test script error" The result of 'TestRunner()' is not callable"

Gang Yan

Thank you reply:

 

I modify test script and run normal. But test result TPS  only 1.32. (run 200 threads). Test log not error .

 

 

Test script:

 

# The sorting tes  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

from java.sql import DriverManager

from oracle.jdbc import OracleDriver

 

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

#

# 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"))

test = Test(2, 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

#

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

 

#test1 = Test(1, "Database insert")

test2 = Test(2, "Database query")

 

# Load the Oracle JDBC driver.

DriverManager.registerDriver(OracleDriver())

 

def getConnection():

    return DriverManager.getConnection(

        "jdbc:oracle:thin:@unpgv4410.us.oracle.com:1521:orcl", "PBPUBLIC", "PBPUBLIC")

 

def ensureClosed(object):

    try: object.close()

    except: pass

 

# One time initialisation that cleans out old data.

connection = getConnection()

statement = connection.createStatement()

 

ensureClosed(statement)

ensureClosed(connection)

 

class TestRunner:

   def __call__(self):

         endTime = datetime.now() + duration

         notDone = True

         while notDone:

           notDone = datetime.now() < endTime

 

         connection = None

         insertStatement = None

         queryStatement = None

 

         try:

            connection = getConnection()

            queryStatement = connection.createStatement()

#           insertStatement = connection.createStatement()

#           test1.record(insertStatement)

#           insertStatement.execute("insert into grinder_test values(%d, %d)" %

#                                   (grinder.threadNumber, grinder.runNumber))

 

            test2.record(queryStatement)

            queryStatement.execute("select * from employee")

 

         finally:

#           ensureClosed(insertStatement)

            ensureClosed(queryStatement)

            ensureClosed(connection)

 

From: Marc Holden [mailto:[hidden email]]
Sent: 2015
1014 21:06
To: grinder-use
Subject: Re: [Grinder-use] JDBC test script error" The result of 'TestRunner()' is not callable"

 

Hi Gang,

 

You need to uncomment out the __call__ method definition (line 189).  Grinder uses that method as the entry point for the worker processes.

 

-Marc

 

On Wed, Oct 14, 2015 at 6:57 AM Gang Yan <[hidden email]> wrote:

Hi all :

 

I use JDBC.py script run  performance testing . grinder log info:

 

2015-10-14 18:42:40,132 ERROR com-0 thread-24: aborting thread - {}The result of 'TestRunner()' is not callable

net.grinder.scriptengine.jython.JythonScriptExecutionException: The result of 'TestRunner()' is not callable

        at net.grinder.scriptengine.jython.JythonScriptEngine.createWorkerRunnable(JythonScriptEngine.java:183) ~[grinder-core-3.11.jar:na]

        at net.grinder.engine.process.GrinderProcess$ThreadStarterImplementation$2.create(GrinderProcess.java:784) ~[grinder-core-3.11.jar:na]

        at net.grinder.engine.process.GrinderThread.run(GrinderThread.java:90) ~[grinder-core-3.11.jar:na]

        at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]

2015-10-14 18:42:40,132 ERROR com-0 thread-3: aborting thread - {}The result of 'TestRunner()' is not callable

net.grinder.scriptengine.jython.JythonScriptExecutionException: The result of 'TestRunner()' is not callable

        at net.grinder.scriptengine.jython.JythonScriptEngine.createWorkerRunnable(JythonScriptEngine.java:183) ~[grinder-core-3.11.jar:na]

        at net.grinder.engine.process.GrinderProcess$ThreadStarterImplementation$2.create(GrinderProcess.java:784) ~[grinder-core-3.11.jar:na]

        at net.grinder.engine.process.GrinderThread.run(GrinderThread.java:90) ~[grinder-core-3.11.jar:na]

        at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]

 

I modify script, but still  error. Please help check it.

 

I  test script :

 

# The sorting tes  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

from java.sql import DriverManager

from oracle.jdbc import OracleDriver

 

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

#

# 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"))

test = Test(2, 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

#

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

 

#test1 = Test(1, "Database insert")

test2 = Test(2, "Database query")

 

# Load the Oracle JDBC driver.

DriverManager.registerDriver(OracleDriver())

 

def getConnection():

    return DriverManager.getConnection(

        "jdbc:oracle:thin:@den00bvr.us.oracle.com:1521:orcl", "PBPUBLIC", "PBPUBLIC")

 

def ensureClosed(object):

    try: object.close()

    except: pass

 

# One time initialisation that cleans out old data.

connection = getConnection()

statement = connection.createStatement()

 

#try: statement.execute("drop table grinder_test1126")

#except: pass

 

#statement.execute("create table grinder_test1126(thread number, run number)")

 

ensureClosed(statement)

ensureClosed(connection)

 

class TestRunner:

   def __init__(self):

#        tid = grinder.threadNumber

 

#        if (grinder.threadNumber % 2 == 0):

#             Even threadNumber

#             Do insertStatement

#        else:

#             Odd threadNumber

#             Do queryStatement

 

#   def __call__(self):

#       self.testRunner()

 

        endTime = datetime.now() + duration

        notDone = True

        while notDone:

         connection = None

         insertStatement = None

         queryStatement = None

         notDone = datetime.now() < endTime

 

        try:

            connection = getConnection()

#           insertStatement = connection.createStatement()

            queryStatement = connection.createStatement()

 

#           test1.record(insertStatement)

#           insertStatement.execute("insert into grinder_test1126 values(%d, %d)" %

#                                   (grinder.threadNumber, grinder.runNumber))

 

            test2.record(queryStatement)

            queryStatement.execute("select * from employee")

 

        finally:

#           ensureClosed(insertStatement)

            ensureClosed(queryStatement)

            ensureClosed(connection)

 

------------------------------------------------------------------------------
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use


------------------------------------------------------------------------------

_______________________________________________
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: JDBC test script error" The result of 'TestRunner()' is not callable"

Marc Holden
It is hard to say why you are seeing such a low TPS value.  That may be how the system performs, especially when 200 threads executing the same query from the same address hit the same table at virtually the same time.  Make sure you look at some of the other statistics.  Personally, I focus on mean test time, mean time to first byte  and standard deviation in addition to TPS, as these provide a good indication of how the system is performing. 

On Wed, Oct 14, 2015 at 9:27 AM Gang Yan <[hidden email]> wrote:

Thank you reply:

 

I modify test script and run normal. But test result TPS  only 1.32. (run 200 threads). Test log not error .

 

 

Test script:

 

# The sorting tes  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

from java.sql import DriverManager

from oracle.jdbc import OracleDriver

 

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

#

# 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"))

test = Test(2, 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

#

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

 

#test1 = Test(1, "Database insert")

test2 = Test(2, "Database query")

 

# Load the Oracle JDBC driver.

DriverManager.registerDriver(OracleDriver())

 

def getConnection():

    return DriverManager.getConnection(

        "jdbc:oracle:thin:@unpgv4410.us.oracle.com:1521:orcl", "PBPUBLIC", "PBPUBLIC")

 

def ensureClosed(object):

    try: object.close()

    except: pass

 

# One time initialisation that cleans out old data.

connection = getConnection()

statement = connection.createStatement()

 

ensureClosed(statement)

ensureClosed(connection)

 

class TestRunner:

   def __call__(self):

         endTime = datetime.now() + duration

         notDone = True

         while notDone:

           notDone = datetime.now() < endTime

 

         connection = None

         insertStatement = None

         queryStatement = None

 

         try:

            connection = getConnection()

            queryStatement = connection.createStatement()

#           insertStatement = connection.createStatement()

#           test1.record(insertStatement)

#           insertStatement.execute("insert into grinder_test values(%d, %d)" %

#                                   (grinder.threadNumber, grinder.runNumber))

 

            test2.record(queryStatement)

            queryStatement.execute("select * from employee")

 

         finally:

#           ensureClosed(insertStatement)

            ensureClosed(queryStatement)

            ensureClosed(connection)

 

From: Marc Holden [mailto:[hidden email]]
Sent: 2015
1014 21:06
To: grinder-use
Subject: Re: [Grinder-use] JDBC test script error" The result of 'TestRunner()' is not callable"

 

Hi Gang,

 

You need to uncomment out the __call__ method definition (line 189).  Grinder uses that method as the entry point for the worker processes.

 

-Marc

 

On Wed, Oct 14, 2015 at 6:57 AM Gang Yan <[hidden email]> wrote:

Hi all :

 

I use JDBC.py script run  performance testing . grinder log info:

 

2015-10-14 18:42:40,132 ERROR com-0 thread-24: aborting thread - {}The result of 'TestRunner()' is not callable

net.grinder.scriptengine.jython.JythonScriptExecutionException: The result of 'TestRunner()' is not callable

        at net.grinder.scriptengine.jython.JythonScriptEngine.createWorkerRunnable(JythonScriptEngine.java:183) ~[grinder-core-3.11.jar:na]

        at net.grinder.engine.process.GrinderProcess$ThreadStarterImplementation$2.create(GrinderProcess.java:784) ~[grinder-core-3.11.jar:na]

        at net.grinder.engine.process.GrinderThread.run(GrinderThread.java:90) ~[grinder-core-3.11.jar:na]

        at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]

2015-10-14 18:42:40,132 ERROR com-0 thread-3: aborting thread - {}The result of 'TestRunner()' is not callable

net.grinder.scriptengine.jython.JythonScriptExecutionException: The result of 'TestRunner()' is not callable

        at net.grinder.scriptengine.jython.JythonScriptEngine.createWorkerRunnable(JythonScriptEngine.java:183) ~[grinder-core-3.11.jar:na]

        at net.grinder.engine.process.GrinderProcess$ThreadStarterImplementation$2.create(GrinderProcess.java:784) ~[grinder-core-3.11.jar:na]

        at net.grinder.engine.process.GrinderThread.run(GrinderThread.java:90) ~[grinder-core-3.11.jar:na]

        at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]

 

I modify script, but still  error. Please help check it.

 

I  test script :

 

# The sorting tes  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

from java.sql import DriverManager

from oracle.jdbc import OracleDriver

 

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

#

# 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"))

test = Test(2, 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

#

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

 

#test1 = Test(1, "Database insert")

test2 = Test(2, "Database query")

 

# Load the Oracle JDBC driver.

DriverManager.registerDriver(OracleDriver())

 

def getConnection():

    return DriverManager.getConnection(

        "jdbc:oracle:thin:@den00bvr.us.oracle.com:1521:orcl", "PBPUBLIC", "PBPUBLIC")

 

def ensureClosed(object):

    try: object.close()

    except: pass

 

# One time initialisation that cleans out old data.

connection = getConnection()

statement = connection.createStatement()

 

#try: statement.execute("drop table grinder_test1126")

#except: pass

 

#statement.execute("create table grinder_test1126(thread number, run number)")

 

ensureClosed(statement)

ensureClosed(connection)

 

class TestRunner:

   def __init__(self):

#        tid = grinder.threadNumber

 

#        if (grinder.threadNumber % 2 == 0):

#             Even threadNumber

#             Do insertStatement

#        else:

#             Odd threadNumber

#             Do queryStatement

 

#   def __call__(self):

#       self.testRunner()

 

        endTime = datetime.now() + duration

        notDone = True

        while notDone:

         connection = None

         insertStatement = None

         queryStatement = None

         notDone = datetime.now() < endTime

 

        try:

            connection = getConnection()

#           insertStatement = connection.createStatement()

            queryStatement = connection.createStatement()

 

#           test1.record(insertStatement)

#           insertStatement.execute("insert into grinder_test1126 values(%d, %d)" %

#                                   (grinder.threadNumber, grinder.runNumber))

 

            test2.record(queryStatement)

            queryStatement.execute("select * from employee")

 

        finally:

#           ensureClosed(insertStatement)

            ensureClosed(queryStatement)

            ensureClosed(connection)

 

------------------------------------------------------------------------------
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use

------------------------------------------------------------------------------
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use

------------------------------------------------------------------------------

_______________________________________________
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: JDBC test script error" The result of 'TestRunner()' is not callable"

Gang Yan

Thank you reply

 

I modify test script .add jdbc insert sql and increase DB sessions(1000). 500 threads test result:  TPS 6.61.

 

 

 

Tests                   Errors          Mean Test       Test Time     TPS         

                                                 Time (ms)        Standard                  

                                                 Deviation                

                                                    (ms)                     

 

Test 1       1000         0            23.87             30.77            3.31          "JDBC Test Result_Multi-Threads"

Test 2       1000         0            17.95            27.38             3.31          "JDBC Test Result_Multi-Threads"

 

Totals       2000         0            20.91            29.27            6.61        

 

Have any suggest  for improve TPS value ?

 

Thanks!

 

 

Test script:

 

# The sorting tes  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

from java.sql import DriverManager

from oracle.jdbc import OracleDriver

 

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

#

# 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"))

test = Test(2, 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

#

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

 

test1 = Test(1, "Database insert")

test2 = Test(2, "Database query")

 

# Load the Oracle JDBC driver.

DriverManager.registerDriver(OracleDriver())

 

def getConnection():

    return DriverManager.getConnection(

        "jdbc:oracle:thin:@unpgv4010.us.oracle.com:1521:orcl", "PBPUBLIC", "PBPUBLIC")

 

def ensureClosed(object):

    try: object.close()

    except: pass

 

# One time initialisation that cleans out old data.

connection = getConnection()

statement = connection.createStatement()

 

try: statement.execute("drop table grinder_test")

except: pass

 

statement.execute("create table grinder_test(thread number, run number)")

 

ensureClosed(statement)

ensureClosed(connection)

 

class TestRunner:

   def __call__(self):

         endTime = datetime.now() + duration

         notDone = True

         while notDone:

           notDone = datetime.now() < endTime

 

         connection = None

         insertStatement = None

         queryStatement = None

 

         try:

            connection = getConnection()

            queryStatement = connection.createStatement()

            insertStatement = connection.createStatement()

            test1.record(insertStatement)

            insertStatement.execute("insert into grinder_test values(%d, %d)" %

                                   (grinder.threadNumber, grinder.runNumber))

 

            test2.record(queryStatement)

            queryStatement.execute("select count(*) from grinder_test")

 

         finally:

            ensureClosed(insertStatement)

            ensureClosed(queryStatement)

            ensureClosed(connection)

 


------------------------------------------------------------------------------

_______________________________________________
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: JDBC test script error" The result of 'TestRunner()' is not callable"

Gary Mulder-3
On 15 October 2015 at 10:02, Gang Yan <[hidden email]> wrote:
 

Tests                   Errors          Mean Test       Test Time     TPS         

                                                 Time (ms)        Standard                  

                                                 Deviation                

                                                    (ms)                     

 

Test 1       1000         0            23.87             30.77            3.31          "JDBC Test Result_Multi-Threads"

Test 2       1000         0            17.95            27.38             3.31          "JDBC Test Result_Multi-Threads"

 

Totals       2000         0            20.91            29.27            6.61        

 

Have any suggest  for improve TPS value ?


Buy a faster DB? You're probably testing the disk I/O on the DB server.

Regards,
Gary

------------------------------------------------------------------------------

_______________________________________________
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: JDBC test script error" The result of 'TestRunner()' is not callable"

Marc Holden
Hi Gang,

You can probably squeeze out a few more TPS by adding some sleep statements between 10 and 50ms.  Make sure you are monitoring the CPU and memory usage of the agent box as well as the cpu, memory, iops of the db server as well.  It is very possible that your agent box is becoming resource starved.  If you have room on the agent, it is more than likely as Gary said...   

On Thu, Oct 15, 2015 at 5:26 AM Gary Mulder <[hidden email]> wrote:
On 15 October 2015 at 10:02, Gang Yan <[hidden email]> wrote:
 

Tests                   Errors          Mean Test       Test Time     TPS         

                                                 Time (ms)        Standard                  

                                                 Deviation                

                                                    (ms)                     

 

Test 1       1000         0            23.87             30.77            3.31          "JDBC Test Result_Multi-Threads"

Test 2       1000         0            17.95            27.38             3.31          "JDBC Test Result_Multi-Threads"

 

Totals       2000         0            20.91            29.27            6.61        

 

Have any suggest  for improve TPS value ?


Buy a faster DB? You're probably testing the disk I/O on the DB server.

Regards,
Gary
------------------------------------------------------------------------------
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use

------------------------------------------------------------------------------

_______________________________________________
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: Has anyone added median to the summary statistics?

Darren Ball
In reply to this post by Darren Ball
It is funny Gary...

Gil just gave a talk at Intuit (CA) where I work, on this subject, entitle the same as the youtube video.

Ironic!

-Darren

On Thu, Oct 8, 2015 at 7:21 AM, Darren Ball <[hidden email]> wrote:

Thanks Gary,
But I am not just satisfying myself with these numbers.  :)

I have requests for min, max, mode and median regardless of the fact that I think they may not matter.

I was just wondering if anyone has had luck getting these into summary stats.

On Oct 8, 2015 2:21 AM, "Gary Mulder" <[hidden email]> wrote:
Anything is possible, but the 99th, 99.9th and 99.99th percentiles might tell you more about the actual performance of your system.

Have a watch of this when you have a spare 45 minutes:


Regards,
Gary 

On 8 October 2015 at 05:17, Darren Ball <[hidden email]> wrote:
Is it possible to add median to summary statistics?



------------------------------------------------------------------------------

_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use



------------------------------------------------------------------------------

_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use



------------------------------------------------------------------------------

_______________________________________________
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: Has anyone added median to the summary statistics?

Gary Mulder-3
Darren,

What is perhaps more ironic is the is the kool aid Gil has identified that most Performance Testers are drinking and sharing with management when producing statistics. I've started to move on from perf. testing to data analytics and what I'm learning has put into question many of the stats most test tools report.

I always sort of knew that standard deviations > means were indicative of invalid statistical conclusions based around the assumption of Gaussian (bell curve) distributed random processes. Most response times are not Gaussian distributed, unless you have a very well-behaved application that isn't loaded near capacity.

I suspect that Poison distributions rather than Gaussian distributions are what we should be measuring and modelling - namely counts of events over an interval of time. Add in Gil's coordinated omission and the complete lack of statistical significance analysis when reporting results and the only conclusion you can really make about the numbers coming out of our performance tests is that "they bear some general indication on what might occur under ideal real world load conditions".

In the end we can thank developers for often delivering very non-performant code which provides for a target rich environment for load testing! Simply throwing somewhat representative load an an application and watching what starts to smoke usually provides enough evidence that the application needs some performance redesign and re-factoring.

While there will always be a role for performance testing, I propose that A/B testing and concomitant rigorous statistical comparison between the performance of A and B is likely the future of cloudy big-data apps.

Regards,
Gary


On 5 November 2015 at 21:19, Darren Ball <[hidden email]> wrote:
It is funny Gary...

Gil just gave a talk at Intuit (CA) where I work, on this subject, entitle the same as the youtube video.

Ironic!

-Darren

On Thu, Oct 8, 2015 at 7:21 AM, Darren Ball <[hidden email]> wrote:

Thanks Gary,
But I am not just satisfying myself with these numbers.  :)

I have requests for min, max, mode and median regardless of the fact that I think they may not matter.

I was just wondering if anyone has had luck getting these into summary stats.

On Oct 8, 2015 2:21 AM, "Gary Mulder" <[hidden email]> wrote:
Anything is possible, but the 99th, 99.9th and 99.99th percentiles might tell you more about the actual performance of your system.

Have a watch of this when you have a spare 45 minutes:


Regards,
Gary 

On 8 October 2015 at 05:17, Darren Ball <[hidden email]> wrote:
Is it possible to add median to summary statistics?



------------------------------------------------------------------------------

_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use



------------------------------------------------------------------------------

_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use



------------------------------------------------------------------------------

_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use



------------------------------------------------------------------------------

_______________________________________________
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: Has anyone added median to the summary statistics?

Gary Mulder-3

------------------------------------------------------------------------------

_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use
Loading...