<sampleResult timeStamp="1203020590037" dataType="text" threadName="Alex Thread 1-1" label="1 GET /ndm-core/en.us/examples/s
ample_Mult
iSlot_PerI
tm.jsp" time="31" responseMessage="OK" responseCode="200" success="true"/>
<sampleResult timeStamp="1203020590225" dataType="text" threadName="Alex Thread 1-1" label="2 GET /ndm-core/sessionstart" time="0" responseMessage="OK" responseCode="200" success="true"/>
<sampleResult timeStamp="1203020590287" dataType="text" threadName="Alex Thread 1-1" label="3 GET /ndm-core/logdata" time="0" responseMessage="OK" responseCode="200" success="true"/>
<sampleResult timeStamp="1203020605443" dataType="text" threadName="Alex Thread 1-1" label="4 GET /ndm-core/customcontext" time="156" responseMessage="OK" responseCode="200" success="true"/>
<sampleResult timeStamp="1203020605506" dataType="text" threadName="Alex Thread 1-1" label="5 POST /ndm-core/log" time="0" responseMessage="Internal Server Error" responseCode="500" success="false"/>
<sampleResult timeStamp="1203020605521" dataType="text" threadName="Alex Thread 1-1" label="6 GET /ndm-core/sessionend" time="0" responseMessage="Internal Server Error" responseCode="500" success="false"/>
<sampleResult timeStamp="1203020605646" dataType="text" threadName="Alex Thread 1-1" label="1 GET /ndm-core/en.us/examples/s
ample_Mult
iSlot_PerI
tm.jsp" time="0" responseMessage="OK" responseCode="200" success="true"/>
<sampleResult timeStamp="1203020605787" dataType="text" threadName="Alex Thread 1-1" label="2 GET /ndm-core/sessionstart" time="0" responseMessage="OK" responseCode="200" success="true"/>
<sampleResult timeStamp="1203020605834" dataType="text" threadName="Alex Thread 1-1" label="3 GET /ndm-core/logdata" time="0" responseMessage="OK" responseCode="200" success="true"/>
<sampleResult timeStamp="1203020620881" dataType="text" threadName="Alex Thread 1-1" label="4 GET /ndm-core/customcontext" time="31" responseMessage="OK" responseCode="200" success="true"/>
<sampleResult timeStamp="1203020620943" dataType="text" threadName="Alex Thread 1-1" label="5 POST /ndm-core/log" time="0" responseMessage="Internal Server Error" responseCode="500" success="false"/>
<sampleResult timeStamp="1203020620959" dataType="text" threadName="Alex Thread 1-1" label="6 GET /ndm-core/sessionend" time="16" responseMessage="Internal Server Error" responseCode="500" success="false"/>
--------------------------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----
So From this xml ,Basically we need the output in another file to be as follows:-
Call 1,ThreadName:name of thread,Average response time:avg response time
Call 2,ThreadName:name of thread,Average response time:avg response time
So in this case, a call would be the first 6 responses,
The second call would be the next 6 responses&
A log file could have anywhere from 1 to 10 different threads and each different thread could have a different number of requests (represented by label)
So what were going to need to do is parse out the time for each request and then calculated the avg response time for each call.
To determine a call, we will need to basically load everything into arrays and then check the label value& when the next value starts at 1 again, then we are at a new call.
Start Free Trial