diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2011-02-16 18:01:17 (GMT) |
---|---|---|
committer | João Abecasis <joao.abecasis@nokia.com> | 2011-02-16 18:01:17 (GMT) |
commit | 9db05f0b7bf68392dc925d4047aa74dac88b348a (patch) | |
tree | 3690ea636187c9af9459ff3bfd4cab3e2af97c57 /demos | |
parent | 0df215e5afc780c1fddd9e410f7ef0814ac1307c (diff) | |
parent | 5a1676af979ab75c8939e53e0223ccbea7708de4 (diff) | |
download | Qt-9db05f0b7bf68392dc925d4047aa74dac88b348a.zip Qt-9db05f0b7bf68392dc925d4047aa74dac88b348a.tar.gz Qt-9db05f0b7bf68392dc925d4047aa74dac88b348a.tar.bz2 |
Merge branch earth-team/master into earth-staging
Conflicts:
doc/src/development/qmake-manual.qdoc
Diffstat (limited to 'demos')
-rw-r--r-- | demos/browser/networkaccessmanager.cpp | 9 | ||||
-rw-r--r-- | demos/browser/networkaccessmanager.h | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/demos/browser/networkaccessmanager.cpp b/demos/browser/networkaccessmanager.cpp index 9e717bb..c63c0eb 100644 --- a/demos/browser/networkaccessmanager.cpp +++ b/demos/browser/networkaccessmanager.cpp @@ -64,7 +64,7 @@ NetworkAccessManager::NetworkAccessManager(QObject *parent) : QNetworkAccessManager(parent), requestFinishedCount(0), requestFinishedFromCacheCount(0), requestFinishedPipelinedCount(0), - requestFinishedSecureCount(0) + requestFinishedSecureCount(0), requestFinishedDownloadBufferCount(0) { connect(this, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*))); @@ -106,14 +106,19 @@ void NetworkAccessManager::requestFinished(QNetworkReply *reply) if (reply->attribute(QNetworkRequest::ConnectionEncryptedAttribute).toBool() == true) requestFinishedSecureCount++; + if (reply->attribute(QNetworkRequest::DownloadBufferAttribute).isValid() == true) + requestFinishedDownloadBufferCount++; + if (requestFinishedCount % 10) return; double pctCached = (double(requestFinishedFromCacheCount) * 100.0/ double(requestFinishedCount)); double pctPipelined = (double(requestFinishedPipelinedCount) * 100.0/ double(requestFinishedCount)); double pctSecure = (double(requestFinishedSecureCount) * 100.0/ double(requestFinishedCount)); + double pctDownloadBuffer = (double(requestFinishedDownloadBufferCount) * 100.0/ double(requestFinishedCount)); + #ifdef QT_DEBUG - qDebug("STATS [%lli requests total] [%3.2f%% from cache] [%3.2f%% pipelined] [%3.2f%% SSL/TLS]", requestFinishedCount, pctCached, pctPipelined, pctSecure); + qDebug("STATS [%lli requests total] [%3.2f%% from cache] [%3.2f%% pipelined] [%3.2f%% SSL/TLS] [%3.2f%% Zerocopy]", requestFinishedCount, pctCached, pctPipelined, pctSecure, pctDownloadBuffer); #endif } diff --git a/demos/browser/networkaccessmanager.h b/demos/browser/networkaccessmanager.h index 76fc198..d6e6ede 100644 --- a/demos/browser/networkaccessmanager.h +++ b/demos/browser/networkaccessmanager.h @@ -60,6 +60,7 @@ private: qint64 requestFinishedFromCacheCount; qint64 requestFinishedPipelinedCount; qint64 requestFinishedSecureCount; + qint64 requestFinishedDownloadBufferCount; public slots: void loadSettings(); |