cossme / grinder

The Grinder, a Java Load Testing Framework
Other
37 stars 15 forks source link

Grinder Console: showing wrong statistics #30

Open SSam009 opened 5 years ago

SSam009 commented 5 years ago

Grinder Console is showing wrong TPS, we can reproduce it with the simple HelloWorld program. Showing same TPS for all commands and Total also.

This issue started with the 3.11 version.

Script to reproduce issue: hellow.py

from net.grinder.script.Grinder import grinder from net.grinder.script import Test log = grinder.logger.info test1 = Test(1, "Log method") test2 = Test(2, "Test1 method") test3 = Test(3, "Test2 method") logWrapper1 = test1.wrap(log) logWrapper2 = test2.wrap(log) logWrapper3 = test3.wrap(log)

class TestRunner: def call(self): tid = grinder.threadNumber

    if tid % 4 == 5:
        logWrapper1("Test1 ThreadNumber:" + str(tid))
            grinder.sleep(2500)
    elif tid % 4 == 1:
        logWrapper2("Test2 ThreadNumber:" + str(tid))
            grinder.sleep(200)
    else:
        logWrapper3("Test3 ThreadNumber:" + str(tid))
            grinder.sleep(10)

Attached results screenshot for Grinder-4.0.0 and Grinder3.10 grinder4 0 0results grinder3 10resultsscreenshot