473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

Hi.

How can I measure transmission time in client-server application?(lag)
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 1735
JosAH
11,448 Expert 8TB
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
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
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...
7
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...
6
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>...
1
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 =...
3
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...
5
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...
13
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...
2
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...
1
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...
3
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...

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.