Merge pull request #2924 from sje397/TrafficGraph

[QT] Add network traffic graph to debug window
This commit is contained in:
Wladimir J. van der Laan
2013-10-15 03:48:22 -07:00
13 changed files with 618 additions and 9 deletions

View File

@@ -51,6 +51,16 @@ int ClientModel::getNumBlocksAtStartup()
return numBlocksAtStartup;
}
quint64 ClientModel::getTotalBytesRecv() const
{
return CNode::GetTotalBytesRecv();
}
quint64 ClientModel::getTotalBytesSent() const
{
return CNode::GetTotalBytesSent();
}
QDateTime ClientModel::getLastBlockDate() const
{
if (chainActive.Tip())
@@ -85,6 +95,8 @@ void ClientModel::updateTimer()
// ensure we return the maximum of newNumBlocksOfPeers and newNumBlocks to not create weird displays in the GUI
emit numBlocksChanged(newNumBlocks, std::max(newNumBlocksOfPeers, newNumBlocks));
}
emit bytesChanged(getTotalBytesRecv(), getTotalBytesSent());
}
void ClientModel::updateNumConnections(int numConnections)