How to record aggregate latency from concurrent threads?

Ahmad Alnafoosi <[email protected]> Tue, 30 Aug 2016 17:40:21 -0500
Newsgroups gmane.comp.java.grinder.user
Message-ID <[email protected]>
--===============2541495657401029352==
Content-Type: multipart/alternative;
	boundary="_2f55fec3-9486-4b8c-bd40-520b6f018c6e_"

--_2f55fec3-9486-4b8c-bd40-520b6f018c6e_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


Hi I am trying to create a Grinder script that captures the following laten=
cy

1- Basic scenario is one Agent/ one thread ( Complex Scenario Multiple Agen=
ts and multiple threads )2- Start Timer3- For each of [Specific List of URL=
s] send concurrent requests       -HTTP GET of the URL4- When all the URLs'=
 GET commands completes  Stop Timer. 5- Capture the time as aggregate GET l=
atency.=20

I was not able to find any similar example in the Scripts examples http://g=
rinder.sourceforge.net/g3/script-gallery.html =20
So I attempted to use concurrency within a worker http://www.jython.org/jyt=
honbook/en/1.0/Concurrency.html =20
as follows:=20
	t1 =3D threading.Thread(target=3Dlambda:ObjList[0].GET())	t2 =3D threading=
.Thread(target=3Dlambda:ObjList[1].GET())	t1.start()	t2.start()

BUT It fails with the following errorEngineException: net.grinder.engine.co=
mmon.EngineException: Must be called from worker thread When I call the sam=
e method without the Thread it works sequentially (which I do not want)
Is there a better way ??
thanks
Ahmad   		 	   		  =

--_2f55fec3-9486-4b8c-bd40-520b6f018c6e_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 12pt=3B
font-family:Calibri
}
--></style></head>
<body class=3D'hmmessage'><div dir=3D'ltr'><div><br></div><div>Hi&nbsp=3B</=
div><div>I am trying to create a Grinder script that captures the following=
 latency</div><div><br></div><div><br></div><div>1- Basic scenario is one A=
gent/ one thread ( Complex Scenario Multiple Agents and multiple threads )<=
/div><div>2- Start Timer</div><div>3- For each of [Specific List of URLs] s=
end concurrent requests</div><div>&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B-HTTP =
GET of the URL</div><div>4- When all the URLs' GET commands completes &nbsp=
=3BStop Timer.&nbsp=3B</div><div>5- Capture the time as aggregate GET laten=
cy.&nbsp=3B</div><div><br></div><div><br></div><div>I was not able to find =
any similar example in the Scripts examples http://grinder.sourceforge.net/=
g3/script-gallery.html &nbsp=3B</div><div><br></div><div>So I attempted to =
use concurrency within a worker&nbsp=3B</div><div>http://www.jython.org/jyt=
honbook/en/1.0/Concurrency.html &nbsp=3B</div><div><br></div><div>as follow=
s:&nbsp=3B</div><div><br></div><div><span class=3D"Apple-tab-span" style=3D=
"white-space:pre">	</span>t1 =3D threading.Thread(target=3Dlambda:ObjList[0=
].GET())</div><div><span class=3D"Apple-tab-span" style=3D"white-space:pre"=
>	</span>t2 =3D threading.Thread(target=3Dlambda:ObjList[1].GET())</div><di=
v><span class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>t1.start=
()</div><div><span class=3D"Apple-tab-span" style=3D"white-space:pre">	</sp=
an>t2.start()</div><div><br></div><div><br></div><div>BUT It fails with the=
 following error</div><div>EngineException: net.grinder.engine.common.Engin=
eException: Must be called from worker thread</div><div>&nbsp=3B</div><div>=
When I call the same method without the Thread it works sequentially (which=
 I do not want)</div><div><br></div><div>Is there a better way ??</div><div=
><br></div><div>thanks</div><div><br></div><div>Ahmad &nbsp=3B</div> 		 	  =
 		  </div></body>
</html>=

--_2f55fec3-9486-4b8c-bd40-520b6f018c6e_--


--===============2541495657401029352==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============2541495657401029352==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============2541495657401029352==--