r/programmingtools • u/Kar98 • Feb 16 '15
Request Tool for measuring mouse response time
I'm working on a project where we have an ubsurd requirement to test that when a mouse click is pressed, that the system responds to it within 0.1 seconds. Now from my understanding, this should be handled by the kernal (windows Xp) and a IO interrupt is sent to the CPU (correct me if I'm wrong). Is there some tool that anyone knows of that can measure this occurring?
Additionally is there a tool for measuring the time it takes for a drop down menu to display in Internet Explorer 8 when the mouse is clicked?
1
Upvotes
1
u/centurijon Feb 16 '15 edited Feb 16 '15
What is meant by "respond"?
Having a visual change? Getting data back from a server?
On the web?! The browser that is rendering the visual isn't even a product that you have any control over. The only way to make that faster (assuming no css animations) is use better scripting tools, or speed up the response from the server.
I'd ask for examples of how they did this testing before, or put the burden of finding the tool in the hands of the meat bag that wrote the requirement
1
u/jrkirby Feb 16 '15
The easiest solution is a high speed camera. Anything above 100 fps should be good enough for you.
I mean you could try to mess with some kernel code and "prove" that the system is responding as fast as you say it is. But honestly, I wouldn't put much faith in it if, like, someone's life depended on it.
How would you know how fast the kernel is responding? the only way to know that would be to put a sensor on the mouse itself. And if you're bothering to attach extra hardware and synchronize clocks and there's all this room for error, why not just film it?
1
u/robertmeta Feb 17 '15 edited Feb 17 '15
I recommend you use Selenium. It will emulate a mouse click, so you will have an exact time when the "mouse" was clicked. Then you just have a tight loop scanning for a piece of data that means the page had successful completed loading (text, etc). Done.
Since Selenium drives a browser, it gives real life (ish) performance. The tight loop will possible slow down the browser render, but you can put a sleep in there -- since you are only looking for 100ms resolution. Do 50 checks 2ms apart if the tight loop is slowing rendering.
Selenium can be driven by your language of choice, and it super-simple. I like driving it with Go, but literally any of the dozen+ languages it supports will work.