[Grinder-use] Grinder 3 doubt
Distributed load testing framework - Java, Jython, or Clojure scripts.
Brought to you by:
philipa
|
From: Zapata, J. A. <za...@hp...> - 2004-03-15 09:54:39
|
Hi all,
=20
I'm writing a Grinder 3 script and I have a doubt. I would like to
know how many concurrent users there were active in each test, so I did
use a global variable (usuarios) and a new statistic value, and inside
the __call__ method I did write the next code:
=20
=20
....
...
def __call__(self):
global usuarios
if grinder.getRunNumber() =3D=3D 0:
usuarios+=3D1
...
...
=20
But because I virtually never got the total users I thougth I'm
losing "increments" because of the thread dealing, so I did modify the
script to the next:
=20
......
.....
usuarios=3D0
bloq=3Dmutex()
=20
def __incusr__(kk):
global usuarios
usuarios+=3D1
=20
......
.....
....
def __call__(self):
global bloq
global usuarios
if grinder.getRunNumber() =3D=3D 0:
bloq.lock(__incusr__,"")
bloq.unlock()
=20
But I'm still "losing" users. Do anybody know what the problem is?
I'm losing threads? I'm not locking correctly?
=20
To enforce to run all threads from the start, I wrote the next line
into the properties file:
=20
grinder.initialSleepTime=3D0
=20
Also, in order to reduce disk acces when I'm using a bounch of
concurrent users I wrote the next property:
=20
grinder.reportToConsole.interval=3D5000
=20
=20
=20
regards,
=20
Jose Antonio Zapata Rey
HP Services / Consulting & Integration
Hewlett - Packard Spain
Tlf: (+34) 91.634.88.00 - Ext.: (7) 21578
Movil: (+34) 646.078.699
eMail: za...@hp... <mailto:za...@hp...>=20
=20
|