mirror of https://github.com/aria2/aria2
renamed TorrentMan::deltaUpload to TorrentMan::deltaUploadLength
parent
eb3103933b
commit
f3096f8cd8
|
@ -256,7 +256,7 @@ void PeerInteractionCommand::receiveMessage() {
|
||||||
peerConnection);
|
peerConnection);
|
||||||
sendMessageQueue->addPendingMessage(pendingMessage);
|
sendMessageQueue->addPendingMessage(pendingMessage);
|
||||||
e->torrentMan->addUploadLength(message->getLength());
|
e->torrentMan->addUploadLength(message->getLength());
|
||||||
e->torrentMan->addDeltaUpload(message->getLength());
|
e->torrentMan->addDeltaUploadLength(message->getLength());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PeerMessage::CANCEL:
|
case PeerMessage::CANCEL:
|
||||||
|
|
|
@ -70,15 +70,15 @@ void TorrentConsoleDownloadEngine::calculateStatistics() {
|
||||||
long long int elapsed = Util::difftv(now, cp[currentCp]);
|
long long int elapsed = Util::difftv(now, cp[currentCp]);
|
||||||
|
|
||||||
sessionDownloadSize[0] += torrentMan->getDeltaDownloadLength();
|
sessionDownloadSize[0] += torrentMan->getDeltaDownloadLength();
|
||||||
sessionUploadSize[0] += torrentMan->getDeltaUpload();
|
sessionUploadSize[0] += torrentMan->getDeltaUploadLength();
|
||||||
sessionDownloadSize[1] += torrentMan->getDeltaDownloadLength();
|
sessionDownloadSize[1] += torrentMan->getDeltaDownloadLength();
|
||||||
sessionUploadSize[1] += torrentMan->getDeltaUpload();
|
sessionUploadSize[1] += torrentMan->getDeltaUploadLength();
|
||||||
|
|
||||||
downloadSpeed = calculateSpeed(sessionDownloadSize[currentCp], elapsed);
|
downloadSpeed = calculateSpeed(sessionDownloadSize[currentCp], elapsed);
|
||||||
uploadSpeed = calculateSpeed(sessionUploadSize[currentCp], elapsed);
|
uploadSpeed = calculateSpeed(sessionUploadSize[currentCp], elapsed);
|
||||||
|
|
||||||
torrentMan->resetDeltaDownloadLength();
|
torrentMan->resetDeltaDownloadLength();
|
||||||
torrentMan->resetDeltaUpload();
|
torrentMan->resetDeltaUploadLength();
|
||||||
|
|
||||||
if(elapsed-lastElapsed >= 1000000) {
|
if(elapsed-lastElapsed >= 1000000) {
|
||||||
printStatistics();
|
printStatistics();
|
||||||
|
|
|
@ -37,7 +37,7 @@ TorrentMan::TorrentMan():bitfield(NULL),
|
||||||
peerEntryIdCounter(0), cuidCounter(0),
|
peerEntryIdCounter(0), cuidCounter(0),
|
||||||
downloadLength(0), uploadLength(0),
|
downloadLength(0), uploadLength(0),
|
||||||
preDownloadLength(0), preUploadLength(0),
|
preDownloadLength(0), preUploadLength(0),
|
||||||
deltaDownloadLength(0), deltaUpload(0),
|
deltaDownloadLength(0), deltaUploadLength(0),
|
||||||
storeDir("."),
|
storeDir("."),
|
||||||
multiFileTopDir(NULL),
|
multiFileTopDir(NULL),
|
||||||
setupComplete(false),
|
setupComplete(false),
|
||||||
|
|
|
@ -79,7 +79,7 @@ private:
|
||||||
long long int preDownloadLength;
|
long long int preDownloadLength;
|
||||||
long long int preUploadLength;
|
long long int preUploadLength;
|
||||||
int deltaDownloadLength;
|
int deltaDownloadLength;
|
||||||
int deltaUpload;
|
int deltaUploadLength;
|
||||||
int fileMode;
|
int fileMode;
|
||||||
string storeDir;
|
string storeDir;
|
||||||
int port;
|
int port;
|
||||||
|
@ -176,13 +176,13 @@ public:
|
||||||
long long int getTotalLength() const { return totalLength; }
|
long long int getTotalLength() const { return totalLength; }
|
||||||
void setTotalLength(long long int length) { totalLength = length; }
|
void setTotalLength(long long int length) { totalLength = length; }
|
||||||
|
|
||||||
void addDeltaDownloadLength(int size) { deltaDownloadLength += size; }
|
void addDeltaDownloadLength(int length) { deltaDownloadLength += length; }
|
||||||
int getDeltaDownloadLength() const { return deltaDownloadLength; }
|
int getDeltaDownloadLength() const { return deltaDownloadLength; }
|
||||||
void resetDeltaDownloadLength() { deltaDownloadLength = 0; }
|
void resetDeltaDownloadLength() { deltaDownloadLength = 0; }
|
||||||
|
|
||||||
void addDeltaUpload(int size) { deltaUpload += size; }
|
void addDeltaUploadLength(int length) { deltaUploadLength += length; }
|
||||||
int getDeltaUpload() const { return deltaUpload; }
|
int getDeltaUploadLength() const { return deltaUploadLength; }
|
||||||
void resetDeltaUpload() { deltaUpload = 0; }
|
void resetDeltaUploadLength() { deltaUploadLength = 0; }
|
||||||
|
|
||||||
void addDownloadLength(int deltaLength) { downloadLength += deltaLength; }
|
void addDownloadLength(int deltaLength) { downloadLength += deltaLength; }
|
||||||
long long int getDownloadLength() const { return downloadLength; }
|
long long int getDownloadLength() const { return downloadLength; }
|
||||||
|
|
Loading…
Reference in New Issue