nuxeo / FunkLoad

Functional and load testing framework for web applications, written in Python
http://funkload.nuxeo.org/
GNU General Public License v2.0
382 stars 83 forks source link

benchmark teardowns threads for quite a long time #105

Open timurb opened 11 years ago

timurb commented 11 years ago

I use a simple test with 3 consecutive gets and it runs fine when I run it as fl-run-test but it hangs when I try to run it as fl-run-bench:

$  fl-run-bench test_geogrep.py MyTest.test_creds                                                                    * master 139aeb0
No handlers could be found for logger "FunkLoad"
========================================================================
Benching MyTest.test_creds
========================================================================
No test description
------------------------------------------------------------------------

Configuration
=============

* Current time: 2013-11-09T14:09:59.040055
* Configuration file: /home/timur/funkload/MyTest.conf
* Log xml: /home/timur/git/funkload/simple-bench.xml
* Server: http://int.myserver.net
* Cycles: [50, 75, 100, 125]
* Cycle duration: 10s
* Sleeptime between request: from 0.0s to 0.5s
* Sleeptime between test case: 0.01s
* Startup delay between thread: 0.01s

Benching
========

* setUpBench hook: ... done.

Cycle #0 with 50 virtual users
------------------------------

* setUpCycle hook: ... done.
* Current time: 2013-11-09T14:10:04.650614
* Starting threads: .................................................. done.
* Logging for 10s (until 2013-11-09T14:10:15.297702): ................................................................................................................... done.
* Waiting end of threads: FFFFF............................................F...... done.
* Waiting cycle sleeptime 1s: ... done.
* tearDownCycle hook: ... done.
* End of cycle, 137.54s elapsed.
* Cycle result: **SUCCESSFUL**, 115 success, 0 failure, 0 errors.

Cycle #1 with 75 virtual users
------------------------------

* setUpCycle hook: ... done.
* Current time: 2013-11-09T14:12:22.190175
* Starting threads: ........................................................................... done.
* Logging for 10s (until 2013-11-09T14:12:33.168238): ......................................................................................................... done.
* Waiting end of threads: ......................

You see, the whole test have taken probably a dozen of seconds (I've checked that by tailing the XML report) while waiting for the end of threads have taken several minutes. At first I even thought it was hanging.

Is it ok that it takes so long? Can this be somehow improved?

I use funkload 1.16.1-4 from Ubuntu repository but can test from HEAD if needed.

nomeata commented 10 years ago

Is there any chance that you have long-running request? I am under the impression (but purely from observing funkload here; I am not a developer) that every thread finishes its current request (or even test) and then checks if it should stop itself.