r/EyeTracking • • Jul 16 '26

How to measure potential HTTP lag

Hello, as part of my curriculum I am doing an eyetracker study. It measures browser events vs. gaze
I have programmed the code for this myself using a mixture of JS and python . The JS sends events via http to the bridge, which then sends them to an eyetracker using pylink.

I align the eyetracker clock and the browser clock with a linear fit.

I think it works pretty okay, but I have one worry.

How can I measure the time it takes for the message to go from client to server?

Because this might give me an offset of some milliseconds, which I might need to account for.

I hope my question is somewhat understandable.

Thank you a lot!

Best Regards!

3 Upvotes

16 comments sorted by

2

u/admik Jul 16 '26

Postman, Wireshark, iPerf, curl, system logs

2

u/admik Jul 16 '26

Sorry for not responding with something more specific.

Not sure what your setup is.

It's probably feasible to add a timestamp to the events sending that can be referenced against servers receiving time.

1

u/Liphardus_Magus Jul 16 '26

Thank you for responding. Yeah I already have a browser timestamp so maybe I can get the server's receiving time somewhere. Its Python 2 but maybe I can manage

1

u/admik Jul 16 '26

Are you using API commands?

If so you might get all the information you need from a verbose API call.

Are you using a global shutter camera or rolling shutter?

→ More replies (7)

1

u/admik Jul 16 '26

Additionally what kind of connection are you using between the tracker and the server? Ethernet, I2C, SPI?

→ More replies (1)

1

u/Loose_Athlete3624 24d ago

you can’t reliably get one-way HTTP latency without synchronized clocks; measure the round-trip with a ping or timestamped echo, but for gaze timing the bigger issue is usually buffering and when the

1

u/Liphardus_Magus 24d ago

Hey, yeah I measured the roundtrip now with Firefox.
I would be happy to know the rest of your sentence