473,569 Members | 3,040 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to measure lag in client-server application (ideas wanted)

27 New Member
Hi.

How can I measure transmission time in client-server application?(la g)
Is there such an option in TCP/IP protocol?
That is , a client sends to the server a message, I want to know how time it took for the message to reach the server.


Please help me I am nearly desperate ,cant find any information on the topic.
Nov 17 '08 #1
2 1743
JosAH
11,448 Recognized Expert MVP
An exrtremely simple approach assumes that it takes as much time to go from
a to b as it takes to go from b to a. If the client sends something at t_0, the
server receives the message at t_1 and sends a response back immediately
which is received by the client at t_2, then (the assumption) t_2-t_1 == t_1-t_0
Both t_2 and t_0 are registered at one party's side so the time to travel from a
to b (or vice versa) is (t_2-t_0)/2

kind regards,

Jos
Nov 17 '08 #2
ValValVal
27 New Member
An exrtremely simple approach assumes that it takes as much time to go from
a to b as it takes to go from b to a. If the client sends something at t_0, the
server receives the message at t_1 and sends a response back immediately
which is received by the client at t_2, then (the assumption) t_2-t_1 == t_1-t_0
Both t_2 and t_0 are registered at one party's side so the time to travel from a
to b (or vice versa) is (t_2-t_0)/2

kind regards,

Jos

Thanks for this advice,but I need measure lag for single messages (creating clocks in Internet chess client). Is there a way to do it?

Big thanks for advice and best regards.
Nov 17 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

13
1588
by: Chiller | last post by:
I'm now getting close to finishing my Distance class. In the code below I have included a number of overload operators that test for equality etc. I've also added more code in the TEST_DISTANCE driver to test the code. I now have 2 remaining problems: 1. The code will allow for the input of distances in either cm, m or km values;...
7
1291
by: Peng Yu | last post by:
Hi, For example, there is a function which is called many times from different places in a program. I want measure how long this function runs in total. Of course, I can use gettimeofday to measure its running time. But it looks a little cumbersome. I'm wondering whether there is a class for it. Thanks!
6
61813
by: Charles M. Reinke | last post by:
I'm using the function clock() to measure the run time of a program so that I can compare among several different algorithms. My code looks like: #include <stdio.h> #include <stdlib.h> #include <assert.h> #include <time.h> int main() { clock_t start, stop;
1
2137
by: Anand Ganesh | last post by:
Hi All, I have an image which is made to fit in a Window. The user can Zoom In or Zoom Out and Pan the image. These images are Engineering drawings which has been drawn to scale say 1 inch = 40 feet. Now I want to provide a tool for the user where he/she can measure the distance.
3
3855
by: Steve | last post by:
I used the QueryPerformanceCounter and QueryPerformanceFrequency methods in my VC++ 6.0 projects to measure correct time spans, for example for timeouts, how much time takes to execute certain method etc I wonder whether there is something similar in .NET to measure time spans? Meantime I still use these methods through DllImport ...
5
1390
by: Joe Fallon | last post by:
Is there a good way to measure the size of a page delivered to the browser? Also, how do measure the size of Viewstate? I am just using View Source, saving the text file and looking at the number of kb in the Properties of the file. Then I delete everything but the viewstate and measue it the same way. 1. Is it accurate? 2. Is there a...
13
10574
by: Sharon | last post by:
I need to test a performance of some code of mine. I tried using the Environment.TickCount but its resolution is too low (from the MSDN remarks: The resolution of the TickCount property cannot be less than 500 milliseconds.), I also tried the DateTime and it also gives me minimum resolution of 500 milliseconds. But I need to measure much less...
2
2688
by: Krish06 | last post by:
Hi Friends, i just need to measure the frequency and ampitude from sound.. in my pro i create a sine wave(i set freq 1000hz,amptitude200) and i passed that wave sound to my pc thru microphone,here i need to receive the sound to my program and the same time i need to dispaly the frequency,amptitude(1000hz,200) in my program..so i need to...
1
2751
by: kartouss | last post by:
Hello i am new to this forum...can you help me solve this problem.. I have a function encrypt() which encrypts data from a file in 16 bytes till end of file which in turn calls other 4 functions...and i need to measure the time it encrypts the data consecutively for all the 4 functions till end of file... I am fwding you the codes...Please help...
3
1929
by: Ethan Furman | last post by:
Hey all. My thanks to all who have responded so far with my other questions. It is much appreciated. Some background on what I'm doing (a good explanation can be found at http://www.hazelwood.k12.mo.us/~grichert/sciweb/phys8.htm): When measuring, there is some uncertainty as to the *exact* value; so, when doing calculations with these...
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7619
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7930
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6290
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3662
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1229
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.