Overclock.net banner

1 - 20 of 127 Posts

·
Registered
Joined
·
72 Posts
Discussion Starter #1
I wrote this to be a simple mouse testing software that has built-in plotting, CSV save and load, and plot export to PNG capability.

Full source code can be found on GitHub, just search for MouseTester by microe1.

It uses an open source (MIT License) plotting library called OxyPlot that can also be found on GitHub.

Requires the Microsoft .NET 4 Framework. You will need to have this framework installed to run, can be found on Microsoft's site.

Built-in plotting includes:
  • Raw counts vs time = for detecting limited data paths and skipping counts (e.g. 8-bit reporting that caps at +/- 127)
  • Update time per report = for detecting unstable polling rates (on my system it can do 1 ms reliably, YMMV)
  • Velocity vs time (calculated based on cpi) = for tracking speed type measurements
  • Raw X-Y count plotting = for acceleration, jitter, and angle snapping testing, plots a path based on raw counts

MouseTester_v1.1.zip 147k .zip file


Changes in v1.1, February 15, 2015
  • Fix for log file save region decimal symbol
  • Added logging mode
  • Set processor affinity to core #2

MouseTester_v1.2.zip 148k .zip file


Last updated: July 29, 2015

Changes in v1.2
  • Fixed up description handling for plot and save
  • Report total number of events collected
  • Report X/Y displacement from start in counts and distance
  • Report piece-wise linear total path length in counts and distance
  • Added line / stem options to plots
 

Attachments

·
Registered
Joined
·
72 Posts
Discussion Starter #2
Basic Instructions

First, specify the resolution of the mouse by either typing in a value or by clicking the Measure button and following the instructions in the text box at the bottom. Helpful hint, the program does not intercept clicks or movements from the system so I usually just click in the text box area when starting the data collection.

Second, collect some mouse data by clicking the Collect button (or the Log Start button) and following the instructions in the text box at the bottom.

After that you can Plot the data you have collected using the specified cpi for calculations.

You can also save and load your data to .csv for future reference or importing into other programs like excel or [R] etc...

As far as the plots are concerned, first thing I do is window the data (to hide the garbage at the beginning and end of the collection) using the Data Point Start and Data Point End. From there it depends on the movement that was recorded. Here are some examples:

Count vs. Time: This is for looking at the raw counts from the mouse. The line is a moving average of the data and is provided as a general reference to gauge the consistency of the reporting from the mouse. For a mouse that does not loose tracking you will see the counts generally bouncing above and below the line without much deviation. If the counts deviate too much from the line then the mouse tracking may not appear smooth. If the mouse looses tracking then you will see the counts go erratic. You can also sometimes see angle snapping / prediction here (the counts will go to zero and hold there even though you moved the mouse with a slight arc). You can also see data path clipping here if the data plateaus at a fixed value (e.g. 127 for 8-bit mice). If the mouse is performing some form of multiplication for cpi boosting then you may be able to see that here as skipped counting steps.

Velocity vs. Time: This uses the time interval between updates, the cpi, and the counts to calculate the velocity of the mouse movement. Using fast swipes you can try to get the malfunction rate of the mouse here. Just like Counts vs. Time going erratic, when the tracking is lost the velocity goes erratic as well.

Interval vs. Time: This is for checking the consistency of the update rate from the mouse (i.e. 1000 Hz mouse updates every 1 ms).

X vs. Y: This is just plotting the data that you collected as a path. Like paint testing you can draw arbitrary shapes and see the exact raw mouse reports (e.g. jitter, angle snapping, stair stepping, etc...). Arbitrary movements can be used for acceleration and accuracy testing using this kind of plot as well. For example accuracy can be tested by starting from some point "A", moving the mouse (e.g. varying speed / angles) and then returning to point A. You should see the path that you moved the mouse along with the start and end points being roughly the same. You can do fast swipe / slow swipe back to the same point movements for acceleration testing. You can also do things like move the mouse in a bunch of circles and seeing if the path drifts away.
 

·
Registered
Joined
·
72 Posts
Discussion Starter #3
FAQ
Quote:
OMG this is a virus!
Some anti-virus software will flag this program because it probably looks like a keylogger and/or because of the hooks into win32 libraries. Full source code is available in case you want to compile your own binary. All you need is the (as of this post still available and still free from Microsoft) Visual C# 2010 Express.
 

·
Registered
Joined
·
72 Posts
Discussion Starter #4
Known Issues

Windows region settings can cause issues with import and export of log files when comma is used as the decmial symbol. Fixed in v1.1

Description not applied to save / plots. Fixed in v1.2
 

·
Registered
Joined
·
72 Posts
Discussion Starter #5
Other Notes

Mice have some characteristics that we have in general classified using the following terms:

Tracking Speed: Moving the mouse quickly is reported correctly by the mouse. Some mice when you move them too fast will lose tracking and either stop reporting entirely or spaz out and give you random reports or cap out at some count.
Move the mouse very quickly and look at the velocity. In general you should see a curve that is unbroken and maybe has some jitter at high speeds. If the velocity drops to zero or there is some garbage then the mouse lost tracking. The highest velocity along the curve that still looks okay is in general the max tracking speed. Some mice the top of the curve is a plateau, this is indicative of internal data path saturation in the mouse sensor or firmware which results in negative acceleration. Others have used Enotus in the past, but without the data curve plotted you can't see if Enotus is falsely reporting because of some garbage or jitter from the mouse.

Acceleration: Moving the mouse the same distance fast results in different total reported counts than when we move it slow. Can be positive (moves farther the faster the mouse moves) or negative (moves less the faster you move the mouse).
Move the mouse fast in one direction and then move the mouse slow back to exactly the original position. If you plot the X-Y you should see the mouse counts return exactly back to the origin. You can also do this test in game and there are some youtube videos of in-game tests.

Jitter: Moving the mouse in a relatively straight line results in an inconsistent (random staircase) movement.
Move the mouse slowly in a diagonal motion and view the data in the X-Y plot. You are looking for big stair-step or non-linearity along the path. Look around for old Razer Abyssus paint plots.

Angle Snapping/Prediction/Drift Control: This one has been called a few things but in general it is the mouse reporting straight line movement even when the user might have meant to draw a slight angle or curve.
You can sometimes see this during the fast swipes for max tracking rate. The "Y" reports from the mouse will go to zero and hold there (which is highly unlikely from swiping your mouse fast). The other way is to draw a circle and see if the mouse "forces" a straight line. People have done this in paint or you can do this with the X-Y plot and capturing a circle. One of the nice things with my tool is you can draw the shapes in paint and then plot the corresponding raw data with my tool, as long as it is one complete motion and you hold the button down the entire time.

Excessive Anti-Jitter: Moving the mouse slightly or very slowly from a standstill may result in a delay or no movement registration.
Move the mouse very slowly and see what the counts reports look like. This one is kind of hard to test.

Polling Rate Consistency: Move the mouse and see if the report rate from the mouse is consistent at the supposed setting (125, 500, 1000 Hz). Some mice have had a problem with 1000 Hz in the past.
Just move the mouse around and plot the interval. It should be a relatively straight line at the desired report rate. 1ms = 1000 Hz of course. There are other report rate measuring tools out there.

Interpolation: Scaling the counts from a mouse to one that is not native to the sensor. Magnified counts is a form of interpolating CPI up, while halving counts can be seen as a form of interpolating down. Doesn't have to be a power of two, can be any factor since it's just math. Mouse driver sensitivity slider is a form of interpolation that runs on the PC.
This one you can't really see with my tool alone. If I had an oscilloscope and captured the communications from the sensor to the mouse microprocessor and compared that to the counts from the microprocessor reported to the PC then I could see if the mouse microprocessor is interpolating the data.

Measuring CPI: 400 DPI/CPI isn't necessarily 400 CPI! Due to manufacturing tolerance and other factors the CPI that you set may not be exact. You can use my tool to measure the "real" CPI and compare that to the "desired" CPI setting. Some mice are way off, others are dead on. Ruler + counts doesn't lie, but of course take into account human error and maybe do some averaging. Moving the mouse quickly is reported correctly by the mouse. Some mice when you move them too fast will lose tracking and either stop reporting entirely or spaz out and give you random reports or cap out at some count.
Move the mouse very quickly and look at the velocity. In general you should see a curve that is unbroken and maybe has some jitter at high speeds. If the velocity drops to zero or there is some garbage then the mouse lost tracking. The highest velocity along the curve that still looks okay is in general the max tracking speed. Some mice the top of the curve is a plateau, this is indicative of internal data path saturation in the mouse sensor or firmware which results in negative acceleration. Others have used Enotus in the past, but without the data curve plotted you can't see if Enotus is falsely reporting because of some garbage or jitter from the mouse.

Smoothing/Frame-Induced Delay:This is a new one that has come up recently but unfortunately it is very difficult to measure, the following is my somewhat simplified understanding of the process. The mouse sensor acquires images of the surface called "frames". The frame rate of the sensor may or may not be constant. There are signal processing algorithms that takes these frames and translates them into counts. Depending on the signal processing algorithm there is an inherent latency from when the movement occurs to when the sensor has the counts available in the motion registers (frame delay). These counts are acquired from the sensor by an external microcontroller which accumulates these counts, optionally does some additional processing, finally sending a value to the PC on the next USB poll. Measuring these delays would take specialized equipment.

It may be possible to test the relative mouse to PC delay with a modification to the software so that it captures data from two mice simultaneously and stores the results on a per mouse basis. There is some normalizing of counts so you can compare the movements accurately on the time scale. You can probably get relative time to within a millisecond or so before the PC / USB polling rate becomes the limiting factor.
 

·
Registered
Joined
·
106 Posts
Ahaha, I was wondering why my mouse seemed different the last month, was checking out the lazer version of this mouse. Classic, I started using the optical due to precision and being able to handle 500hz, could possibly do more, but 2ms is all good. Nice app, if it wasn't for this I wouldn't have known that it reset to 125hz, just proves it works.
thumb.gif
 

·
Registered
Joined
·
657 Posts
From looking at the source code, am I right in assuming the program relies on the raw input model (WM_INPUT messages) rather than fetching Windows input reports (WM_MOUSEMOVE)?
 

·
Registered
Joined
·
657 Posts
Great.

Something you might want to include in your guide is the possiblity to zoom in on the graphs. You can naturally do that using the start and end points, but I think many people will find it more comfortable clicking on the part they want to zoom in on and using the scroll wheel. I found out that you can do that and didn't see it mentioned here. Just hold down the mouse wheel (MOUSE3) and move your mouse to zoom in on a specific area or click with left mouse click and scroll up/down.
 

·
Registered
Joined
·
5,431 Posts





This is my G400 (apparently its the angle snapping version, no enhanced pointer precision) with 400 dpi going through 1000-125hz polling rate. I tried some wild movements as well as a few moderate ones.
 

·
Registered
Joined
·
657 Posts
Would it be possible for you to slightly change the OxyPlot implementation so that the graph style can be changed (dot, line, bar, etc.)?

Thanks!
 

·
Registered
Joined
·
1,651 Posts
it would be nice, if it could collect the mousedata without the need to keep the button pressed.
so it can record the movement while you are actually ingame.
thumb.gif
 

·
Mouse reviewer
Joined
·
3,097 Posts
Quote:
Originally Posted by thuNDa View Post

it would be nice, if it could collect the mousedata without the need to keep the button pressed.
so it can record the movement while you are actually ingame.
thumb.gif
Someone already did that modification with the source code, I don't remember who though. But I have a version of the software that does just that.
 

·
Registered
Joined
·
779 Posts
Love this program. Easily the most versatile and useful mouse program I have. Though I'm not sure about it's polling rate monitoring accuracy and prefer MouseMovementRecorder for that.

One other tweak I would recommend for the graphing is to allow for expanding the y-axis (x-axis can be adjusted with scroll wheel as someone else mentioned, or PgUp PgDn I discovered) because sometimes data points that coincide with the top minor y axis aren't plotted.

Also, maybe try a slightly less aggressive averaging calculation for 1000Hz because I find that the trend line is much more erratic with that many data points, which can be misleading in some situations, particularly to new users of the program.
 
1 - 20 of 127 Posts
Top