Opened 10 years ago

Closed 10 years ago

#1520 closed Bug (fixed)

"transmission-remote -l" doesn't show Infinite ratio properly

Reported by: dzimi Owned by: charles
Priority: Normal Milestone: 1.41
Component: Daemon Version: 1.40
Severity: Minor Keywords:
Cc:

Description

testbox (seeding):

debian:/storage/2008/11/27/1227794813# transmission-remote localhost:15365 -n 751:423986 -l
ID    Done  ETA       Up      Down    Ratio  Status       Name
   1  100%  Done       744.6     0.0    0.0  Seeding      NFSManager.dmg
debian:/storage/2008/11/27/1227794813# transmission-remote localhost:15365 -n 751:423986 -l
ID    Done  ETA       Up      Down    Ratio  Status       Name
   1  100%  Done       744.6     0.0    0.0  Seeding      NFSManager.dmg
debian:/storage/2008/11/27/1227794813# transmission-remote localhost:15365 -n 751:423986 -l
ID    Done  ETA       Up      Down    Ratio  Status       Name
   1  100%  Done       744.6     0.0    0.0  Seeding      NFSManager.dmg
debian:/storage/2008/11/27/1227794813# transmission-remote localhost:15365 -n 751:423986 -l
ID    Done  ETA       Up      Down    Ratio  Status       Name
   1  100%  Done         0.0     0.0    0.0  Idle         NFSManager.dmg
debian:/storage/2008/11/27/1227794813# transmission-remote localhost:15365 -n 751:423986 -l
ID    Done  ETA       Up      Down    Ratio  Status       Name
   1  100%  Done         0.0     0.0    0.0  Idle         NFSManager.dmg
debian:/storage/2008/11/27/1227794813# transmission-remote localhost:15365 -n 751:423986 -l
ID    Done  ETA       Up      Down    Ratio  Status       Name
   1  100%  Done         0.0     0.0    0.0  Idle         NFSManager.dmg
debian:/storage/2008/11/27/1227794813# transmission-remote localhost:15365 -n 751:423986 -l
ID    Done  ETA       Up      Down    Ratio  Status       Name
   1  100%  Done         0.0     0.0    0.0  Idle         NFSManager.dmg

On the second box (my mac :)) is running Transmission-1.40+ (r1762 too) - on the Mac ratio works. Seems like last when you did last changes you didn't upgraded deamon code :)

Attachments (1)

daemon-screenshot.png (237.6 KB) - added by dzimi 10 years ago.
Transmission Deamon screenshot

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by dzimi

Transmission Deamon screenshot

comment:1 in reply to: ↑ description Changed 10 years ago by dzimi

Forgot to add, that on MAC i have run r7162 from nightly mac builds. On the debian box i have run transmission-svn7162.tar.bz2 from "Project trunk-linux-inc". Don't known way, but the version from Project trunk-linux-inc is showing as: r7104.

debian:~# transmission-daemon -h
Transmission 1.40+ (7104)  http://www.transmissionbt.com/
A fast and easy BitTorrent client

transmission-daemon is a headless Transmission session
that can be controlled via transmission-remote or Clutch.

Usage: transmission-daemon [options]

Options:
  -h --help                     Display this help page and exit
  -a --allowed      <list>      Allowed IP addresses.  (Default: 127.0.0.1)
  -b --blocklist                Enable peer blocklists
  -B --no-blocklist             Disable peer blocklists
  -f --foreground               Run in the foreground instead of daemonizing
  -g --config-dir   <path>      Where to look for configuration files
  -p --port         <port>      RPC port (Default: 9091)
  -t --auth                     Require authentication
  -T --no-auth                  Don't require authentication
  -u --username     <username>  Set username for authentication
  -v --password     <password>  Set password for authentication
  -w --download-dir <path>      Where to save downloaded data
debian:~# ls -l /usr/local/bin/transmission-daemon 
-rwxr-xr-x 1 root staff 1283820 2008-11-27 14:54 /usr/local/bin/transmission-daemon
debian:~# date
Thu Nov 27 15:34:07 CET 2008
debian:~#

Daemon was compliled compiled at 14:54 GTM+1

comment:2 Changed 10 years ago by charles

  • Milestone changed from None Set to 1.41
  • Owner set to charles
  • Severity changed from Normal to Minor
  • Status changed from new to assigned
  • Summary changed from r7162 - transmission-deamon doesn't show Ratio propertly to "transmission-remote -l" doesn't show Infinite ratio properly
  • Version set to 1.40

comment:3 Changed 10 years ago by charles

  • Component changed from Transmission to Daemon

comment:4 Changed 10 years ago by charles

  • Resolution set to fixed
  • Status changed from assigned to closed

trunk: r7163

1.4x: r7164

comment:5 Changed 10 years ago by KyleK

  • Resolution fixed deleted
  • Status changed from closed to reopened

There still seem to problems with the ratio display of transmission-remote.

One of my torrents has the following stats values:

"downloadedEver": 14447284783
"uploadedEver": 133928042

which results in "uploadRatio": "0.009270". But the remote displays the number "108" as ratio, which doesn't make sense at all.

Another torrent has these values:

"downloadedEver": 0
"uploadedEver": 1503164798
"uploadRatio": "-2.000000"

transmission-remote reports the ratio as "0.00", while it probably should be "Inf"

This was tested on the trunk, svn 7174.

I noticed that the ratio is calculated in multiple places, and even with some differences:

complection.c, tr_cpPercentDone:  tr_getRatio( cp->sizeNow, tr_cpSizeWhenDone( cp ) ); 
complection.c, tr_cpPercentComplete: tr_getRatio( cp->sizeNow, cp->tor->info.totalSize ); 
rpcimpl.c, addField: tr_getRatio( st->uploadedEver, st->downloadedEver ) );
stats.c, updateRatio: tr_getRatio( setme->uploadedBytes, setme->downloadedBytes );
torrent.c, tr_torrentStat: tr_getRatio(s->uploadedEver, s->downloadedEver ? s->downloadedEver : s->haveValid ); 

And to top it all of, daemon/remote.c calculates its own ratio. Wouldn't it be easier to add the "uploadedRatio" to list_keys[] and use that instead?

On a side note, I personally prefer the way tr_torrentStat calculates the ratio: if there has been no download (just seeding), then use the file size as denominator.

comment:6 Changed 10 years ago by charles

  • Resolution set to fixed
  • Status changed from reopened to closed

KyleK: that's a good idea.

trunk: r7201

1.4x: r7202

Note: See TracTickets for help on using tickets.