const QChar L = QLatin1Char('|');
_out << ts << L;
- _out << QString::number(item._requestDuration) << L;
+ _out << L;
if( item._instruction != CSYNC_INSTRUCTION_RENAME ) {
_out << item._file << L;
} else {
// get the Date timestamp from reply
_responseTimestamp = _reply->rawHeader("Date");
- _duration = _durationTimer.elapsed();
if (_followRedirects) {
// ### the qWarnings here should be exported via displayErrors() so they
}
}
-quint64 AbstractNetworkJob::duration()
-{
- return _duration;
-}
-
QByteArray AbstractNetworkJob::responseTimestamp()
{
return _responseTimestamp;
void AbstractNetworkJob::start()
{
_timer.start();
- _durationTimer.start();
- _duration = 0;
const QUrl url = account()->url();
const QString displayUrl = QString( "%1://%2%3").arg(url.scheme()).arg(url.host()).arg(url.path());
bool ignoreCredentialFailure() const { return _ignoreCredentialFailure; }
QByteArray responseTimestamp();
- quint64 duration();
qint64 timeoutMsec() { return _timer.interval(); }
int maxRedirects() const { return 10; }
virtual bool finished() = 0;
QByteArray _responseTimestamp;
- QElapsedTimer _durationTimer;
- quint64 _duration;
bool _timedout; // set to true when the timeout slot is received
// Automatically follows redirects. Note that this only works for
// so make sure we have the up-to-date time
_item->_modtime = job->lastModified();
}
- _item->_requestDuration = job->duration();
_item->_responseTimeStamp = job->responseTimestamp();
_tmpFile.close();
return;
}
- _item->_requestDuration = _job->duration();
_item->_responseTimeStamp = _job->responseTimestamp();
// A 404 reply is also considered a success here: We want to make sure
return;
}
- _item->_requestDuration = _job->duration();
_item->_responseTimeStamp = _job->responseTimestamp();
_item->_fileId = _job->reply()->rawHeader("OC-FileId");
return;
}
- _item->_requestDuration = _job->duration();
_item->_responseTimeStamp = _job->responseTimestamp();
if (_item->_httpErrorCode != 201 ) {
void PropagateUploadFileCommon::finalize()
{
- _item->_requestDuration = _duration.elapsed();
_finished = true;
if (!propagator()->_journal->setFileRecord(SyncJournalFileRecord(*_item, propagator()->getFilePath(_item->_file)))) {
Q_OBJECT
protected:
- QElapsedTimer _duration;
QVector<AbstractNetworkJob*> _jobs; /// network jobs that are currently in transit
bool _finished; /// Tells that all the jobs have been finished
bool _deleteExisting;
void PropagateUploadFileNG::doStartUpload()
{
- _duration.start();
propagator()->_activeJobList.append(this);
const SyncJournalDb::UploadInfo progressInfo = propagator()->_journal->getUploadInfo(_item->_file);
_item->_responseTimeStamp = job->responseTimestamp();
// performance logging
- _item->_requestDuration = _stopWatch.stop();
+ quint64 duration = _stopWatch.stop();
qDebug() << "*==* duration UPLOAD" << _item->_size
<< _stopWatch.durationOfLap(QLatin1String("ContentChecksum"))
<< _stopWatch.durationOfLap(QLatin1String("TransmissionChecksum"))
- << _item->_requestDuration;
+ << duration;
// The job might stay alive for the whole sync, release this tiny bit of memory.
_stopWatch.reset();
finalize();
}
_currentChunk = 0;
- _duration.start();
emit progress(*_item, 0);
startNextChunk();
}
// performance logging
- _item->_requestDuration = _stopWatch.stop();
+ quint64 duration = _stopWatch.stop();
qDebug() << "*==* duration UPLOAD" << _item->_size
<< _stopWatch.durationOfLap(QLatin1String("ContentChecksum"))
<< _stopWatch.durationOfLap(QLatin1String("TransmissionChecksum"))
- << _item->_requestDuration;
+ << duration;
// The job might stay alive for the whole sync, release this tiny bit of memory.
_stopWatch.reset();
_serverHasIgnoredFiles(false), _hasBlacklistEntry(false),
_errorMayBeBlacklisted(false), _status(NoStatus),
_isRestoration(false),
- _httpErrorCode(0), _requestDuration(0), _affectedItems(1),
+ _httpErrorCode(0), _affectedItems(1),
_instruction(CSYNC_INSTRUCTION_NONE), _modtime(0), _size(0), _inode(0)
{
}
quint16 _httpErrorCode;
QString _errorString; // Contains a string only in case of error
QByteArray _responseTimeStamp;
- quint64 _requestDuration;
quint32 _affectedItems; // the number of affected items by the operation on this item.
// usually this value is 1, but for removes on dirs, it might be much higher.