Closed tazihad closed 1 year ago
Thanks Tazihad. Did you build from Github or install from Plasma desktop widget section? I created it in the Manjaro Plasma version, im sure it was the latest. Installing from Plasma desktop widget section seemed to work ok for me. I have noticed some issues in the Github code since i uploaded it. I'll check against Fedora and build via Github and correct any issues i find.
I'm still facing this in v0.1.1, both from Plasma Widgets and manual built, the update interval option seems to be ignored as it keeps updating at the same rate, this is on Plasma 5.26.5 (latest)
Yes, i noticed this last night just after i had uploaded the new version. I fixed one issue with time interval but it wasnt the main thing, annoyingly. Its an issue with the 2 code bases and my understand on the dbus code. Its high priority on my fix list.
Yeah looked at the code and couldn't figure it out with my little qml/plasma api knowledge :laughing: and yeah dbus can be tricky to work with
Yes, tricky is an accurate term! Ok, i have a 'working' version now. Its ugly as sin and i'll need to revisit to improve the code but i'll try and get a new fix out soon. Here's a question I've pondered while working on this, on how you would expect it to work. Let me know which option you would pick? : 1, set to 2 second update interval. When triggered the display shows the bandwidth used at that moment. 2, set to 2 second update interval. When triggered, the display shows the accumulated bandwidth over the entire 2 seconds.
I think option 1 makes more sense, 2 will be the average of that interval and may not represent the current speed? :thinking: Also wouldn't option 1 have the benefit of making less dbus calls/calculations since it is already an averaged value?, correct me if I'm wrong here as haven't looked of how the speed is obtained/calculated
Yep, it would show how much traffic passed in the last 2 seconds also displayed for 2 seconds. From what I've found, the dbus code is triggered every 0.5 seconds (no idea if that can changed). the update interval triggers a separate method that updates the display. so if you set update interval to 2 seconds, the dbus data updates 4 times. The display method updates the display with the last dbus data. It will also just sit there with that data displayed for another 2 seconds until it updates again. That's how it currently works. Could be another checkbox in settings for the 2 options?
Yep, it would show how much traffic passed in the last 2 seconds also displayed for 2 seconds. From what I've found, the dbus code is triggered every 0.5 seconds (no idea if that can changed). the update interval triggers a separate method that updates the display. so if you set update interval to 2 seconds, the dbus data updates 4 times. The display method updates the display with the last dbus data. It will also just sit there with > that data displayed for another 2 seconds until it updates again. That's how it currently works. Could be another checkbox in settings for the 2 options?
I think it would be less confusing having only one interval option, I think most users expect to see the current rate.
Then it could have in a tooltip for example the consumed traffic for the whole session or since x amount of time, similar to what NetSpeed widget has.
As for how fast it should trigger if it can't be changed or is too complicated you could resort to just display the last updated value
@luisbocanegra Version 0.2 just released. The interval issue now fixed. Based on our conversation, i added both option. if you choose any interval above 0.5 sec, you get a second option to show the exact data at each of the interval or an accumulated figure over the length of the last update. Just another option in the spirit of KDE's many options :) let me know how you get on.
Thanks, can confirm the update interval is now working as expected, same with the accumulated bandwidth (haven't tested it thoroughly)
At first I couldn't add the widget to the panel/desktop so had to uninstall it first, I see you changed its name, so probably that was the cause as it was fine running it with plasmoidviewer
Ya. Seems like it works now. closing this issue. Thanks for all the works. Amazing tool btw.
The calculation of the accumulated bandwidth seems to be incorrect, e.g. when the interval to 1 seconds, the value will be about twice the correct value. There is a fix: #8
The algorithm of option 2 (accumulator) now is to add up all consumed traffic and finally divide by the updateInterval
.
I think it would be less confusing having only one interval option, I think most users expect to see the current rate.
I found a similar issue with KDE's System Monitor (plasma-systemmonitor/bookworm, 5.26.90-1 amd64): if set interval to 2 seconds, it will only update the most recent rate every 2 seconds (like the option 1). In other words, it's ignoring samples.
If one of the samples has a large value (for my example, the samba video client will download the buffer every few seconds), this will definitely confuse the user.
@CatEricka I've moved your comments and suggestions to a new 'issue tracker' for further discussion. Lets continue this there. Ta.
I see you changed its name,
@luisbocanegra Hello Luis, I didn't change its name. Where did you see a difference, I'll have to go back and check. I was interested myself in how the update process would go and it seemed to work for me, i could have been using a newer version than what was released to update over though. I did see issues in past attempts to update, I'm wondering if it had to do with serialized variables. Something I'll keep an eye on for future release.
@LeeVD
Hello Luis, I didn't change its name. Where did you see a difference, I'll have to go back and check.
$ pwd
/home/user_name/.local/share/plasma/plasmoids/org.kde.nsw_dbus
Plasma Version: 5.26.4
Update interval is stuck at 0.5 second. Doesn't work other options.
Thanks for this widget. It's amazing work man.