Bug 297931 - ktorrent uses different numbers for share ratio in different places
Summary: ktorrent uses different numbers for share ratio in different places
Status: RESOLVED FIXED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR minor
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-11 21:10 UTC by Michael Skiba
Modified: 2012-04-12 17:43 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
ktorrent showing different share ratios (118.40 KB, image/png)
2012-04-11 21:11 UTC, Michael Skiba
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Skiba 2012-04-11 21:10:41 UTC
User-Agent:       Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0
Build Identifier: 

Hi everyone,

I'm not sure this really qualifies as bug, more a cosmetic thing probably. But it made me wonder. I see two different numbers for the share ratio. They are clearly related to each other, one is just a tiny bit advanced, so I think this is some sort of systematic error. Maybe one of is updated more often?

Please take a look at the red circles in the screenshot I will attach.
Since there weren't much leecher, this number stayed for quite a while (about half an hour) until ktorrent seeded some more and the numbers got equal again.

But I was able to observe that problem one more time, so I'm wondering is a different algorithm used to calculate the second share ratio? Or is it really just an GUI-Update thing?

(Once again, not that it would really bother me, it just made me wonder if it's known/intended or something going wrong)

Reproducible: Sometimes
Comment 1 Michael Skiba 2012-04-11 21:11:28 UTC
Created attachment 70321 [details]
ktorrent showing different share ratios
Comment 2 Joris Guisson 2012-04-12 17:42:34 UTC
It seems we are using a floating point comparison factor of 0.01 to determine if the view needs to be updated. Need to make that 0.001 and it will be the same for both.
Comment 3 Joris Guisson 2012-04-12 17:43:34 UTC
Git commit 053920c23924e76549dcc20d79dcfb965e10958f by Joris Guisson.
Committed on 12/04/2012 at 19:42.
Pushed by guisson into branch 'master'.

Make float comparison factor smaller in ViewModel when checking if share ratio has changed

M  +1    -0    ChangeLog
M  +2    -2    ktorrent/view/viewmodel.cpp

http://commits.kde.org/ktorrent/053920c23924e76549dcc20d79dcfb965e10958f