This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Statistics plugin

Tags: None
(comma "," separated)
Athantor
Registered Member
Posts
45
Karma
0

Statistics plugin

Sat May 12, 2007 1:28 pm
Hi,

I've made simple thing [1] showing speed and connections charts.

Install:
Untar to „plugins/” subdir and apply this patch, to enable compilation.

It's in source tree since SVN666625

Tricks:
  • Double click on chart to find and set new maximum.
  • Hover to get legend

Problems:
  • As far as I've found out, „There Can Be Only One” monitor for kt::TorrentInterface and depending which plugin was loaded last, infowidget was getting SIGSEGV or my plugin wasn't getting needed data, therefore I did something like this (it required less work than implementation of multiple monitors :P).
  • There are rounding errors (double → int) on charts.


I'd appreciate any additional testing, bugs info and suggestions.

Last edited by Athantor on Sun May 20, 2007 1:31 pm, edited 2 times in total.


Image Image
George
Moderator
Posts
5421
Karma
1

Mon May 14, 2007 6:44 pm
Wow, that looks nice !
George
Moderator
Posts
5421
Karma
1

Mon May 14, 2007 7:00 pm
The graphs are pretty, but there are some things I need to nitpick about :

- Tab overload : I think it would be better to get rid of the tab widget and just make 2 bottom tabs
- KiB/s : We have standardized upon KB/s, despite several bug reports wanting us to use kibibytes, I'm not a big fan of these units. (They sound silly)
- Groupbox overload in the configuration dialog

But other then that, it looks very nice.
George
Moderator
Posts
5421
Karma
1

Mon May 14, 2007 7:06 pm
Let me post some screenshots, for the people who don't want to mess around with the source code :

Image


Image
lucke
Registered Member
Posts
205
Karma
0

Tue May 15, 2007 12:55 pm
Alas, I can't really make out anything from those stats O_o Unintuitive charts?
stevenofnine
Registered Member
Posts
62
Karma
0

Tue May 15, 2007 1:37 pm
Simple chart/graph etiquette involves labelling the axes of the chart/graph.

Other than that looks superb, well done!
George
Moderator
Posts
5421
Karma
1

Tue May 15, 2007 6:06 pm
Maybe it is also best if we show the legend as a tooltip (clicking on it is not very obvious)
dierbro
Registered Member
Posts
36
Karma
0

Fri May 18, 2007 5:06 pm
ktorrent -v
Qt: 3.3.8
KDE: 3.5.5
KTorrent: 2.2dev

svn 665575


Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1233630912 (LWP 10660)]
[New Thread -1251529840 (LWP 10672)]
[New Thread -1243137136 (LWP 10671)]
[KCrash handler]
#6 0xb7ecdaa7 in mse::StreamSocket::getDownloadRate ()
from /usr/kde/3.5/lib/libktorrent-2.2dev.so
#7 0xb7ef2546 in bt::Peer::getDownloadRate ()
from /usr/kde/3.5/lib/libktorrent-2.2dev.so
#8 0xb5e9de05 in kt::StatsPlugin::UpdateData ()
from /usr/kde/3.5/lib/kde3/ktstatsplugin.so
#9 0xb5e9e3ab in kt::StatsPlugin::qt_invoke ()
from /usr/kde/3.5/lib/kde3/ktstatsplugin.so
#10 0xb702a399 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#11 0xb702afed in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#12 0xb7366549 in QTimer::timeout () from /usr/qt/3/lib/libqt-mt.so.3
#13 0xb704db4f in QTimer::event () from /usr/qt/3/lib/libqt-mt.so.3
#14 0xb6fcacc7 in QApplication::internalNotify ()
from /usr/qt/3/lib/libqt-mt.so.3
#15 0xb6fcb881 in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3
#16 0xb76076ee in KApplication::notify () from /usr/kde/3.5/lib/libkdecore.so.4
#17 0xb6fbfe3c in QEventLoop::activateTimers ()
from /usr/qt/3/lib/libqt-mt.so.3
#18 0xb6f7a9ec in QEventLoop::processEvents () from /usr/qt/3/lib/libqt-mt.so.3
#19 0xb6fe17f1 in QEventLoop::enterLoop () from /usr/qt/3/lib/libqt-mt.so.3
#20 0xb6fe1676 in QEventLoop::exec () from /usr/qt/3/lib/libqt-mt.so.3
#21 0xb6fca74f in QApplication::exec () from /usr/qt/3/lib/libqt-mt.so.3
#22 0x0808b5a8 in main ()

I can't reproduce it.


unzip;strip;touch;finger;mount;fsck;more;yes;umount;sleep
Athantor
Registered Member
Posts
45
Karma
0

Fri May 18, 2007 9:52 pm
George wrote:there are some things I need to nitpick about


I'm on it.

dierbro wrote:#7 0xb7ef2546 in bt::Peer::getDownloadRate ()


I'm guessing that I tried to get data from invalidated iterator (peer disconnected or sth). Added checking, which I hope fixed the thing.

BIG thanks for the feedback :-D


Image Image
Athantor
Registered Member
Posts
45
Karma
0

Sat May 19, 2007 2:22 pm
How about now?


Image Image
George
Moderator
Posts
5421
Karma
1

Sun May 20, 2007 12:38 pm
I'm gonna include it, we will need to find an icon for it.
George
Moderator
Posts
5421
Karma
1

Sun May 20, 2007 12:56 pm
OK, it is committed
Athantor
Registered Member
Posts
45
Karma
0

Sun May 20, 2007 1:22 pm
George wrote:I'm gonna include it, we will need to find an icon for it.


Image

It's in Tango icon theme and it uses this (table 4 — „utilities-system-monitor”) .

George wrote:OK, it is committed


Yay! :-)


Image Image
clayne
Registered Member
Posts
16
Karma
0

Sun May 20, 2007 11:12 pm
George wrote:The graphs are pretty, but there are some things I need - KiB/s : We have standardized upon KB/s, despite several bug reports wanting us to use kibibytes, I'm not a big fan of these units. (They sound silly)
But other then that, it looks very nice.


Thumbs up on that - because they *are* silly and I also cringe upon seeing people use them. Besides the fact that they are just a nouveau IEC idea, with an indirect connection to SI prefixes, we all know that K = 1024 (1 << 10) and not 1000 in the context of these units (that context not being disk drive space measurement).

What's next, kibbles and bits? :lol:
George
Moderator
Posts
5421
Karma
1

Mon May 21, 2007 6:16 pm
Athantor wrote:
George wrote:I'm gonna include it, we will need to find an icon for it.


Image

It's in Tango icon theme and it uses this (table 4 — „utilities-system-monitor”) .

George wrote:OK, it is committed


Yay! :-)


It's seems that there is no such icon present in the default KDE theme (Crystal SVG)


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot]