jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak Shetty <shet...@gmail.com>
Subject Re: How to get the analyze result of custom Java Request?
Date Wed, 14 Apr 2010 02:38:40 GMT
You can add them as variablkes
JMeterContextService.
getContext().getVariables().put("clientToServer",String.valueOf(clientToServer));

JMeterContextService.
getContext().getVariables().put("ServerToClient",String.valueOf(ServerToClient));



and use sample_variables to be clientToServer,ServerToClient. This will then
get saved along with the sample and you can post process the result

OR

If you want it to be part of response you have to call methods on
SampleResult . If you just want some text returned , you can just have it as
setResponseData.  (though this will be difficult to parse)

OR
You could also create Sub Result and add them with respective times -- see
method addSubResult --
http://jakarta.apache.org/jmeter/api/org/apache/jmeter/samplers/SampleResult.html


On Tue, Apr 13, 2010 at 7:29 PM, sandy320 <sandy320@sohu.com> wrote:

>
> Thanks.
>
> Could you please explain it more detail?
>
> In Java Request Class
>
> public class TestP2P extends AbstractJavaSamplerClient{
>
>    public SampleResult runTest(JavaSamplerContext context) {
>        Long clientToServer=...;   //the time from client to server
>        Long ServerToClient=...;   //the time from server to client
>
>       //I want to analyze these 2 values in JMeter Report
>       // Which method of SampleResult should be invoke to set them to
> result?
>     }
> }
>
>
>
>
>
> sebb-2-2 wrote:
> >
> > On 12/04/2010, sandy320 <sandy320@sohu.com> wrote:
> >>
> >>  A custom Java Request to test Server.
> >>
> >>  I can get the 2 value times of Client==>Sever and Server==>Client in
> >> custom
> >>  Java Request class
> >>
> >>  The question is how to set these 2 value to JMeter Summary Report?
> >>
> >>  I want to analyze these 2 value, such as min,max,avg...
> >>
> >
> > Samplers can set the latency and elapsed times in sample results.
> >
> > However only elapsed time is currently processed by the Summary report.
> >
> > You can add any variables to the saved data:
> >
> >
> http://jakarta.apache.org/jmeter/usermanual/listeners.html#sample_variables
> >
> > However, you will have to process the data yourself.
> >
> >>  Thanks.
> >>
> >> --
> >>  View this message in context:
> >>
> http://old.nabble.com/How-to-get-the-analyze-result-of-custom-Java-Request--tp28214766p28214766.html
> >>  Sent from the JMeter - User mailing list archive at Nabble.com.
> >>
> >>
> >>  ---------------------------------------------------------------------
> >>  To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >>  For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/How-to-get-the-analyze-result-of-custom-Java-Request--tp28214766p28237745.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message