wardi/speedometer

Lacks explanation of speed readings

alphapapa opened this issue · 4 comments

When I run, e.g. $(speedometer -r wlan0), there are three speed numbers displayed in a row. I cannot for the life of me figure out what each one means. I have watched them to try to discern if one being higher causes one next to it to be higher, but that doesn't seem to be the case. I assume they are time-window averages, but they don't seem to make sense.

The man page says nothing about this.

Also, there are two vertical bars next to the histogram, whose colors seem to correspond to two of the speed readings, yet there is no explanation of what these mean either.

thank you for the bug report!

Yes, those are moving average and average readings, and you're right, they're not documented and that should be fixed.

Hey, looking at the code, I think I've figured out the meaning of each number:

Let's assume that we've the following values displayed on the graph:
TX: eth0 90 B/s 97 B/s 100 B/s

Starting from the left,

First number (known as s value in code): The latest sampled value
Second number (known as c value in code): The "curved" value. Basically it is a weighted average values of the last 6 samples. The weighs are assigned such that the latest sampled value has the highest weightage, and the oldest value has the lowest weightage. Concretely, the weighs are in a list:
val = [6, 5, 4, 3, 2, 1]. See the "curve" function in speedometer.py
Third value (known as a value in code): A simple average of all the available data point. (By default the Speedometer class only stores 6 data points)

@wardi Do point out any mistakes in my findings. Also if possible, let me know where can I update the documentation to document the meaning of these values. I believe the best place to document this information would be https://excess.org/speedometer/.

Cheers

wardi commented

@mjchi7 yes the source for that page is at https://github.com/wardi/wardi.github.io/blob/master/_pages/speedometer.md feel free to submit a PR

any reason the description is not put next to the number? because i am really confused about them as well.
also, any reason theres no current speed?

i've been using nload and it shows

  • Curr
  • Avg
  • Min
  • Max
  • Ttl

it would be nice to include at least current speed and Curr or some description next to the nunber.
Screenshot 2024-02-02 at 9 52 16 AM