-
-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculate and display Jitter #39
Comments
I am taking this issue on my existing fork. I will be working towards a PR for review by EOW. |
Here's a proposal for the feature after taking a look at the code. The calculation requires at least 2 round trips to be completed for each hop. The millis Duration value from consecutive hops (HOPn - HOPn-1) results in jitter duration.
Am I overthinking it should I scale it back? |
@trkelly23 thanks for picking this up!
Which headings would be prefixed? I had imagined these jitter related values as additional columns in the hops table, is that what you are proposing? A mockup of what I envisioned:
Is the proposal that these columns would be calculated and/or shown only if the
Yes that makes sense, we should add to all report modes.
Right, similar to
Yes that would be useful. It shouldn't be to difficult to add as there are several other such things in the Tui already, such as pressing
I just had a look in It allows specifying these additional (non-default) columns:
It would be useful to look at how these are calculated and aim to emulate the logic here. From a quick glance they seem more complex than simply |
I have been working on the calculations for Jitter and wrote up a little test file with tests to validate. After checking mtr code and description of jitter per the spec RFC-3550 I was able to create a spreadsheet to calculate the values and code to calculate. The Jitter struct is for test purposes and these fields would go into Hop. Note the cumulative average calculation I'm using may have uncovered a bug in the hop.mean calculation. Please, take a look at the calculation approach. jitter.txt |
Can you give some more details on the potential bug? Aside from the fix I did in commit 4e90da7 (April 2022) the logic seems to have been the same since the very beginning. I don't recall what prompted me to fix that, I suspect I was doing a side-by-side comparison with MTR and was correcting for a divergence between the output. I can't remember exactly, but I believe this may have been my translation of Welford's online algorithm for computing variance on a stream of data in a single pass (note the use of
I've had a look but I may not be understand correctly. Parsing at the code and paraphrasing, it seems the calculation you have are: Javg:
Jint:
Jmax:
The last one seems more like an overall max/worst calculation, rather than a mac/worst jitter calculation? I don't see the basic How do these calculations compare to the logic in MTR? Maybe best to impl these on a branch and do a side-by-side comparison? |
I put a PR up after taking a look at Welford's calculation and a few stats sites. I see now the avg can be calculated if you have the total number in the dataset, the current avg & the new value. Nice much less processing and overhead. Thanks for all the feedback and happy holidays! 🎅 |
Thanks and happy holidays to you as well. I haven't had a chance to look at the code yet but let me know if you are doing any other calculations that are not "streaming friendly" and I can take a look as I still remember a lot of those I learned in school of which mean is one (the one you already found). |
Trippy current calculates the
StDev
column as:Where, for each successful
Probe
(for a given hopttl
), thetotal_recv
,mean
andm2
values are updated as follows:We would like to add support for a Jitter columns similar to those provided by mtr (see https://networkengineering.stackexchange.com/questions/5288/what-is-interarrival-jitter-in-mtr)
The text was updated successfully, but these errors were encountered: