Determining typing latency

Hi all,

When I use an editor (vi) that is spawned in a remote server, visually I could see the latency between typing a character/word and being displayed on the terminal. I could see this visually but how do I get a metric on this or how to quantify this?

As expected, when I type in a editor spawned in my local desktop there is no latency / there is latency that I cannot observe optically (as you know it looks like almost the same event - therefore typing a character and the character to appear on the screen)

Any pointers on how to quantify the typing latency?

I tried with wpm (words per minute), sometimes since the latency is high I am not really convinced whether that is a right metric.

Pointers please. Thanks

A bit on the side this answer, but you could try the netrw plugin to mitigate this:

Vim documentation: pi_netrw

2 Likes

I'd think a simple ping time would be a representative measure of how much delay you get, since the delay is caused by the information that needs to get transmitted through network.

Thanks. I thought of this gropher first but am not really sure whether this is the right one to use for relative metric.

For a region say A, I ping to a local box in region 'A' and ping to remote box in region 'B' which involves a WAN latency. Can I use the average ping metrics to these boxes and say that my typing latency is 'x' times more in remote box when compared to the latency in local box?

Is it a right metric to use?

If you need a more complete overview of latency and network statistics, you can use Smokeping:

Download Smokeping Here

Is there a particular reason you are after a relative metric? Why not look at absolute delay?
I mean, as you said before, the delay on a local box is super small, practically zero. If you'll try to calculate a quotient (remote delay)/(local delay), you'll get huge numbers, and very large inaccuracy.
An absolute measure of the delay would be a much more accurate one, in terms of numerical stability.
However, I believe the ping echoes are given lower priority than let's say, the data being transferred through ssh -X session, so ping need not be the same as your text editing delay, nevertheless, under normal network and processing load, it should come pretty close.

I agree with the obvious that the only real concern is network latency. To measure this, you can just use ping (or any similar network tool), which is good enough unless you are working on some super scientific latency research about how vi performs over a network.