Timers in nGrinder

classic Classic list List threaded Threaded
5 messages Options
Vij
Reply | Threaded
Open this post in threaded view
|

Timers in nGrinder

Vij
Hi

I use Jython-2.2.1 in nGrinder version 3.0 and JDK version 1.7.0_10.
I need to introduce a timer in my code to record time taken for posting a method and receiving a response from server.
The c# code is as follows:

TestContext.BeginTimer("timer");
String methodResponse = posttothemethod.PostMethodtest(url, data);
TestContext.EndTimer("timer");

Could anyone tell me the command for recording time (as shown in the above code).

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Timers in nGrinder

junoyoon
Administrator
Well..

This might be very generic JDK question.

currentTime = System.currentTimeMillis()
DoSth()
timeTaken = System.currentTimeMillis() - currentTime

timeTaken eventually will have the elapsed time eventually.
Reply | Threaded
Open this post in threaded view
|

Re: Timers in nGrinder

viji1188
ok thanks Junoyoon.
Reply | Threaded
Open this post in threaded view
|

Re: Timers in nGrinder

viji1188
In reply to this post by junoyoon
Hi

I ran a performance test for the post method and I need elapsed time (as mentioned above) for the post method to be displayed in the detailed report.

Is the following formula correct to calculate server response time for a test:

responseTime = (Mean_time_to_first_byte-0) - (Mean_time_to_establish_connection-0)

Or is there any other way to display the server response time for each iteration and the average server response time in the detailed report?

Thanks
Vij
Reply | Threaded
Open this post in threaded view
|

Re: Timers in nGrinder

junoyoon
Administrator

Well.. general http is connection less, so responseTime can be just same as mean_time_to_first_byte. 

I think the connection time should be included in the total response time. 

 

And.. Please use nGrinder 3.1. it has the feature you want. Check out our demo instance.


http://ngrinder-demo.nhnopensource.org/perftest/detail?id=22 


You can use login it with user (id)/ user (pw)

 

-----Original Message-----
From: "viji1188 [via ngrinder]"<[hidden email]>
To: "junoyoon"<[hidden email]>;
Cc:
Sent: 2013-01-21 (월) 23:46:02
Subject: Re: Timers in nGrinder

Hi

I use Jython-2.2.1 in nGrinder version 3.0 and JDK version 1.7.0_10.

I ran a performance test for the post method and I need elapsed time (as mentioned above) for the post method to be displayed in the detailed report.

Is the following formula correct to calculate server response time for a test:

responseTime = (Mean_time_to_first_byte-0) - (Mean_time_to_establish_connection-0)

Or is there any other way to display the server response time for each iteration and the average server response time in the detailed report?

Thanks
Vij


If you reply to this email, your message will be added to the discussion below:
http://ngrinder.642.n7.nabble.com/Timers-in-nGrinder-tp127p149.html
To start a new topic under ngrinder-user-en, email [hidden email]
To unsubscribe from ngrinder-user-en, click here.
NAML