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

svn 544402 minor bug in rate display (infowidget chunk view)

Tags: None
(comma "," separated)
agforsyth
Registered Member
Posts
133
Karma
0
If you're ever downloading multiple chunks from the same peer, the chunk view displays the total download rate for that peer in the row for each of it's chunks.

It's a very minor display bug, but I thought I'd mention it.

Image

I reduced it to 8bit color so it would be smaller.
George
Moderator
Posts
5421
Karma
1

Thu May 25, 2006 10:49 am
It's not a bug, we don't calculate download speeds for each chunk, so we just show download speed of the peer assigned to it.
agforsyth
Registered Member
Posts
133
Karma
0

Thu May 25, 2006 9:31 pm
George wrote:It's not a bug, we don't calculate download speeds for each chunk, so we just show download speed of the peer assigned to it.


I know it's not a bug in the sense that it is unintentional, but it is misleading. I think it would make sense to display the speed as the sum of: the speed of the peers on the chunk each divided by the number of chunks being downloaded by that peer.

A one line patch does this:

Code: Select all
Index: libktorrent/torrent/chunkdownload.cpp
===================================================================
--- libktorrent/torrent/chunkdownload.cpp       (revision 544402)
+++ libktorrent/torrent/chunkdownload.cpp       (working copy)
@@ -347,7 +347,7 @@
                while (i != pdown.end())
                {
                        const PeerDownloader* pd = *i;
-                       r += pd->getPeer()->getDownloadRate();
+                       r += (pd->getPeer()->getDownloadRate()) / (pd->getNumGrabbed());
                        i++;
                }
                return r;
George
Moderator
Posts
5421
Karma
1

Fri May 26, 2006 8:21 am
phantom042 wrote:
George wrote:It's not a bug, we don't calculate download speeds for each chunk, so we just show download speed of the peer assigned to it.


I know it's not a bug in the sense that it is unintentional, but it is misleading. I think it would make sense to display the speed as the sum of: the speed of the peers on the chunk each divided by the number of chunks being downloaded by that peer.

A one line patch does this:

Code: Select all
Index: libktorrent/torrent/chunkdownload.cpp
===================================================================
--- libktorrent/torrent/chunkdownload.cpp       (revision 544402)
+++ libktorrent/torrent/chunkdownload.cpp       (working copy)
@@ -347,7 +347,7 @@
                while (i != pdown.end())
                {
                        const PeerDownloader* pd = *i;
-                       r += pd->getPeer()->getDownloadRate();
+                       r += (pd->getPeer()->getDownloadRate()) / (pd->getNumGrabbed());
                        i++;
                }
                return r;



I don't know, this is misleading to, because it could be totally different from the actual speed.
agforsyth
Registered Member
Posts
133
Karma
0

Fri May 26, 2006 6:12 pm
Mathematically, the average will generally be closer than the total speed, and gets closer to the real value as the number of chunks being downloaded from each peer increases, rather than further from the real value as things are now.

Logically, the average will ALWAYS be closer, as each concurrent download from a given peer should be at approximately the same rate.

If you glance at the chunk view, you will be able to get a general idea of your dowload speed (since adding up the speeds will give you a correct total speed value), which is impossible now in the situation described.
George
Moderator
Posts
5421
Karma
1

Sat May 27, 2006 5:12 pm
phantom042 wrote:Mathematically, the average will generally be closer than the total speed, and gets closer to the real value as the number of chunks being downloaded from each peer increases, rather than further from the real value as things are now.

Logically, the average will ALWAYS be closer, as each concurrent download from a given peer should be at approximately the same rate.


The chunks are not downloaded concurrently, Only one piece is downloaded at the same time.
agforsyth
Registered Member
Posts
133
Karma
0

Sat May 27, 2006 6:15 pm
My point is that the average will be closer than the total over any period longer than one second or so. Seeing six chunks each being downloaded at 300k/s when your cap is about 700k/s is much more misleading than seeing one chunk being downloaded at 10k/s rather than 100k/s.


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]