mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 07:46:17 -07:00
Redefine CacheStatus.readRatio field.
Now it is defined as: CacheStatus.readRatio = (blocks read from cache) / (blocks read from disk + blocks read from cache) The 2 variables in denominator are counted separately and the formula before this change doesn't really make sense Add percentage sign to "Read cache hits" stats Also remove redundant header include
This commit is contained in:
parent
e487b31877
commit
b9ec216aa5
2 changed files with 8 additions and 6 deletions
|
@ -77,7 +77,10 @@ void StatsDialog::update()
|
|||
: "-");
|
||||
// Cache hits
|
||||
qreal readRatio = cs.readRatio;
|
||||
m_ui->labelCacheHits->setText((readRatio >= 0) ? Utils::String::fromDouble(100 * readRatio, 2) : "-");
|
||||
m_ui->labelCacheHits->setText(QString("%1%").arg(
|
||||
readRatio > 0
|
||||
? Utils::String::fromDouble(100 * readRatio, 2)
|
||||
: "0"));
|
||||
// Buffers size
|
||||
m_ui->labelTotalBuf->setText(Utils::Misc::friendlyUnit(cs.totalUsedBuffers * 16 * 1024));
|
||||
// Disk overload (100%) equivalent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue