summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks
diff options
context:
space:
mode:
authorThomas Zander <t.zander@nokia.com>2010-10-06 12:32:43 (GMT)
committerThomas Zander <t.zander@nokia.com>2010-10-06 12:32:43 (GMT)
commite3724aeab93a2ab3cc5b1d78c42f9a4e2f60628d (patch)
tree08fa39a9605ec38a45247baea0e2053179f5970f /tests/benchmarks
parent838ed9c68aef4d5a4f0b4d4dbbc1c1f7797cde91 (diff)
parent901ea45ca02dc8fbbf3f6112240c4e468c240b73 (diff)
downloadQt-e3724aeab93a2ab3cc5b1d78c42f9a4e2f60628d.zip
Qt-e3724aeab93a2ab3cc5b1d78c42f9a4e2f60628d.tar.gz
Qt-e3724aeab93a2ab3cc5b1d78c42f9a4e2f60628d.tar.bz2
Merge commit 'origin/master' into fileEngines
Conflicts: src/s60installs/bwins/QtCoreu.def
Diffstat (limited to 'tests/benchmarks')
-rw-r--r--tests/benchmarks/declarative/compilation/data/BoomBlock.qml2
-rw-r--r--tests/benchmarks/declarative/creation/data/item.qml2
-rw-r--r--tests/benchmarks/declarative/creation/data/qobject.qml2
-rw-r--r--tests/benchmarks/declarative/creation/tst_creation.cpp2
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml2
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml2
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml2
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml2
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml2
-rw-r--r--tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml2
-rw-r--r--tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/example.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/anchors/empty.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/anchors/fill.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/anchors/null.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/animation/large.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/animation/largeNoProps.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/item_creation/no_creation.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/loader/Loaded.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/loader/component_loader.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/loader/empty_loader.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/loader/no_loader.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/loader/source_loader.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/vmemetaobject/null.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/vmemetaobject/property.qml2
-rw-r--r--tests/benchmarks/declarative/script/data/CustomObject.qml2
-rw-r--r--tests/benchmarks/declarative/script/data/block.qml2
-rw-r--r--tests/benchmarks/declarative/script/data/global_prop.qml2
-rw-r--r--tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp50
-rw-r--r--tests/benchmarks/network/network.pro1
-rw-r--r--tests/benchmarks/network/ssl/qsslsocket/qsslsocket.pro13
-rw-r--r--tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp103
-rw-r--r--tests/benchmarks/network/ssl/ssl.pro3
39 files changed, 188 insertions, 50 deletions
diff --git a/tests/benchmarks/declarative/compilation/data/BoomBlock.qml b/tests/benchmarks/declarative/compilation/data/BoomBlock.qml
index 3f43579..b757900 100644
--- a/tests/benchmarks/declarative/compilation/data/BoomBlock.qml
+++ b/tests/benchmarks/declarative/compilation/data/BoomBlock.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import Qt.labs.particles 1.0
Item {
diff --git a/tests/benchmarks/declarative/creation/data/item.qml b/tests/benchmarks/declarative/creation/data/item.qml
index f1a7dbc..a6223d0 100644
--- a/tests/benchmarks/declarative/creation/data/item.qml
+++ b/tests/benchmarks/declarative/creation/data/item.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
Item {
Item {}
diff --git a/tests/benchmarks/declarative/creation/data/qobject.qml b/tests/benchmarks/declarative/creation/data/qobject.qml
index bc6b152..33aeb57 100644
--- a/tests/benchmarks/declarative/creation/data/qobject.qml
+++ b/tests/benchmarks/declarative/creation/data/qobject.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
QtObject {
}
diff --git a/tests/benchmarks/declarative/creation/tst_creation.cpp b/tests/benchmarks/declarative/creation/tst_creation.cpp
index 94a67fd..6bf7943 100644
--- a/tests/benchmarks/declarative/creation/tst_creation.cpp
+++ b/tests/benchmarks/declarative/creation/tst_creation.cpp
@@ -130,7 +130,7 @@ void tst_creation::qobject_cpp()
void tst_creation::qobject_qml()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.7\nQtObject {}", QUrl());
+ component.setData("import QtQuick 1.0\nQtObject {}", QUrl());
QObject *obj = component.create();
delete obj;
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml
index df0d5b2..e484ef7 100644
--- a/tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml
@@ -39,6 +39,6 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
QtObject {}
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml
index 399aa78..3ce3296 100644
--- a/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
QtObject {
id: blah
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml
index 4b1d81c..073ed90 100644
--- a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import Qt.labs.particles 1.0
Item { id:block
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml
index 5d67d25..6cf304c 100644
--- a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
QtObject {
property int a
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml
index a22ba25..c4fc05c 100644
--- a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
QtObject {
property int a
diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml b/tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml
index 8c2f46b..90145e8 100644
--- a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml
+++ b/tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml
@@ -39,6 +39,6 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
Item {}
diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml b/tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml
index 45748f5..29dfbe5 100644
--- a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml
+++ b/tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
Item {
property int blah
diff --git a/tests/benchmarks/declarative/qmltime/example.qml b/tests/benchmarks/declarative/qmltime/example.qml
index dca1429..4b6de1d 100644
--- a/tests/benchmarks/declarative/qmltime/example.qml
+++ b/tests/benchmarks/declarative/qmltime/example.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/anchors/empty.qml b/tests/benchmarks/declarative/qmltime/tests/anchors/empty.qml
index 6d8be03..f9418f8 100644
--- a/tests/benchmarks/declarative/qmltime/tests/anchors/empty.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/anchors/empty.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/anchors/fill.qml b/tests/benchmarks/declarative/qmltime/tests/anchors/fill.qml
index 5371c3d..ef6839f 100644
--- a/tests/benchmarks/declarative/qmltime/tests/anchors/fill.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/anchors/fill.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/anchors/null.qml b/tests/benchmarks/declarative/qmltime/tests/anchors/null.qml
index bb43dc6..b719001 100644
--- a/tests/benchmarks/declarative/qmltime/tests/anchors/null.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/anchors/null.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/animation/large.qml b/tests/benchmarks/declarative/qmltime/tests/animation/large.qml
index 11bb6ba..d109313 100644
--- a/tests/benchmarks/declarative/qmltime/tests/animation/large.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/animation/large.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/animation/largeNoProps.qml b/tests/benchmarks/declarative/qmltime/tests/animation/largeNoProps.qml
index d40627f..6c055dc 100644
--- a/tests/benchmarks/declarative/qmltime/tests/animation/largeNoProps.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/animation/largeNoProps.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml b/tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml
index 0499201..eed5339 100644
--- a/tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml b/tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml
index 9064bc2..cc27f04 100644
--- a/tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/no_creation.qml b/tests/benchmarks/declarative/qmltime/tests/item_creation/no_creation.qml
index d27b2b6..7f8909d 100644
--- a/tests/benchmarks/declarative/qmltime/tests/item_creation/no_creation.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/item_creation/no_creation.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml b/tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml
index 0867d0b..05e287b 100644
--- a/tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/Loaded.qml b/tests/benchmarks/declarative/qmltime/tests/loader/Loaded.qml
index 416e0ea..7199a50 100644
--- a/tests/benchmarks/declarative/qmltime/tests/loader/Loaded.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/loader/Loaded.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
Item {
Rectangle {}
diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/component_loader.qml b/tests/benchmarks/declarative/qmltime/tests/loader/component_loader.qml
index f610eb0..a668423 100644
--- a/tests/benchmarks/declarative/qmltime/tests/loader/component_loader.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/loader/component_loader.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/empty_loader.qml b/tests/benchmarks/declarative/qmltime/tests/loader/empty_loader.qml
index 334e1b4..7070d91 100644
--- a/tests/benchmarks/declarative/qmltime/tests/loader/empty_loader.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/loader/empty_loader.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/no_loader.qml b/tests/benchmarks/declarative/qmltime/tests/loader/no_loader.qml
index 507ed34..7bf14de 100644
--- a/tests/benchmarks/declarative/qmltime/tests/loader/no_loader.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/loader/no_loader.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/source_loader.qml b/tests/benchmarks/declarative/qmltime/tests/loader/source_loader.qml
index 1092a9f..2b95d60 100644
--- a/tests/benchmarks/declarative/qmltime/tests/loader/source_loader.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/loader/source_loader.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml
index a125c54..417ec94 100644
--- a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml
index 18c8fb4..3e9a076 100644
--- a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml
index 2668c4c..d87aa32 100644
--- a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/null.qml b/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/null.qml
index 424f768..dc2fcb4 100644
--- a/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/null.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/null.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/property.qml b/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/property.qml
index f803b82..3adefbc 100644
--- a/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/property.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/property.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/script/data/CustomObject.qml b/tests/benchmarks/declarative/script/data/CustomObject.qml
index 1656453..97f6d39 100644
--- a/tests/benchmarks/declarative/script/data/CustomObject.qml
+++ b/tests/benchmarks/declarative/script/data/CustomObject.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
QtObject {
property real prop1: 0
diff --git a/tests/benchmarks/declarative/script/data/block.qml b/tests/benchmarks/declarative/script/data/block.qml
index f7b2ab3..4575050 100644
--- a/tests/benchmarks/declarative/script/data/block.qml
+++ b/tests/benchmarks/declarative/script/data/block.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
Rectangle {
width: 200; height: 200
diff --git a/tests/benchmarks/declarative/script/data/global_prop.qml b/tests/benchmarks/declarative/script/data/global_prop.qml
index 4fb7ee7..29bbb7d 100644
--- a/tests/benchmarks/declarative/script/data/global_prop.qml
+++ b/tests/benchmarks/declarative/script/data/global_prop.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
import "global.js" as Program
Rectangle {
diff --git a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 0098d8e..6b94f3c 100644
--- a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -51,8 +51,7 @@
#include "../../../../auto/network-settings.h"
-typedef QSharedPointer<QVarLengthArray<char, 0> > QVarLengthArraySharedPointer;
-Q_DECLARE_METATYPE(QVarLengthArraySharedPointer)
+Q_DECLARE_METATYPE(QSharedPointer<char>)
class TimedSender: public QThread
{
@@ -655,44 +654,63 @@ void tst_qnetworkreply::httpDownloadPerformance()
<< ((UploadSize/1024.0)/(elapsed/1000.0)) << " kB/sec";
};
+enum HttpDownloadPerformanceDownloadBufferTestType {
+ JustDownloadBuffer,
+ DownloadBufferButUseRead,
+ NoDownloadBuffer
+};
+Q_DECLARE_METATYPE(HttpDownloadPerformanceDownloadBufferTestType)
+
class HttpDownloadPerformanceClientDownloadBuffer : QObject {
Q_OBJECT
private:
- bool useDownloadBuffer;
+ HttpDownloadPerformanceDownloadBufferTestType testType;
QNetworkReply *reply;
qint64 uploadSize;
+ QList<qint64> bytesAvailableList;
public:
- HttpDownloadPerformanceClientDownloadBuffer (QNetworkReply *reply, bool useDownloadBuffer, qint64 uploadSize)
- : useDownloadBuffer(useDownloadBuffer), reply(reply), uploadSize(uploadSize)
+ HttpDownloadPerformanceClientDownloadBuffer (QNetworkReply *reply, HttpDownloadPerformanceDownloadBufferTestType testType, qint64 uploadSize)
+ : testType(testType), reply(reply), uploadSize(uploadSize)
{
connect(reply, SIGNAL(finished()), this, SLOT(finishedSlot()));
}
public slots:
void finishedSlot() {
- if (useDownloadBuffer) {
+ if (testType == JustDownloadBuffer) {
+ // We have a download buffer and use it. This should be the fastest benchmark result.
QVariant downloadBufferAttribute = reply->attribute(QNetworkRequest::DownloadBufferAttribute);
- QSharedPointer<QVarLengthArray<char, 0> > data = downloadBufferAttribute.value<QSharedPointer<QVarLengthArray<char, 0> > >();
- } else {
+ QSharedPointer<char> data = downloadBufferAttribute.value<QSharedPointer<char> >();
+ } else if (testType == DownloadBufferButUseRead) {
+ // We had a download buffer but we benchmark here the "legacy" read() way to access it
+ char* replyData = (char*) qMalloc(uploadSize);
+ QVERIFY(reply->read(replyData, uploadSize) == uploadSize);
+ qFree(replyData);
+ } else if (testType == NoDownloadBuffer) {
// We did not have a download buffer but we still need to benchmark having the data, e.g. reading it all.
+ // This should be the slowest benchmark result.
char* replyData = (char*) qMalloc(uploadSize);
QVERIFY(reply->read(replyData, uploadSize) == uploadSize);
qFree(replyData);
}
+
+ QMetaObject::invokeMethod(&QTestEventLoop::instance(), "exitLoop", Qt::QueuedConnection);
}
};
void tst_qnetworkreply::httpDownloadPerformanceDownloadBuffer_data()
{
- QTest::addColumn<bool>("useDownloadBuffer");
+ QTest::addColumn<HttpDownloadPerformanceDownloadBufferTestType>("testType");
- QTest::newRow("use-download-buffer") << true;
- QTest::newRow("do-not-use-download-buffer") << false;
+ QTest::newRow("use-download-buffer") << JustDownloadBuffer;
+ QTest::newRow("use-download-buffer-but-use-read") << DownloadBufferButUseRead;
+ QTest::newRow("do-not-use-download-buffer") << NoDownloadBuffer;
}
+// Please note that the whole "zero copy" download buffer API is private right now. Do not use it.
void tst_qnetworkreply::httpDownloadPerformanceDownloadBuffer()
{
- QFETCH(bool, useDownloadBuffer);
+ QFETCH(HttpDownloadPerformanceDownloadBufferTestType, testType);
// On my Linux Desktop the results are already visible with 128 kB, however we use this to have good results.
#if defined(Q_OS_SYMBIAN) || defined(Q_WS_WINCE_WM)
@@ -705,18 +723,18 @@ void tst_qnetworkreply::httpDownloadPerformanceDownloadBuffer()
HttpDownloadPerformanceServer server(UploadSize, true, false);
QNetworkRequest request(QUrl("http://127.0.0.1:" + QString::number(server.serverPort()) + "/?bare=1"));
- if (useDownloadBuffer)
+ if (testType == JustDownloadBuffer || testType == DownloadBufferButUseRead)
request.setAttribute(QNetworkRequest::MaximumDownloadBufferSizeAttribute, 1024*1024*128); // 128 MB is max allowed
QNetworkAccessManager manager;
QNetworkReplyPtr reply = manager.get(request);
- HttpDownloadPerformanceClientDownloadBuffer client(reply, useDownloadBuffer, UploadSize);
+ HttpDownloadPerformanceClientDownloadBuffer client(reply, testType, UploadSize);
- connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection);
- QBENCHMARK {
+ QBENCHMARK_ONCE {
QTestEventLoop::instance().enterLoop(40);
QCOMPARE(reply->error(), QNetworkReply::NoError);
+ QVERIFY(reply->isFinished());
QVERIFY(!QTestEventLoop::instance().timeout());
}
}
diff --git a/tests/benchmarks/network/network.pro b/tests/benchmarks/network/network.pro
index ea0f821..73de556 100644
--- a/tests/benchmarks/network/network.pro
+++ b/tests/benchmarks/network/network.pro
@@ -2,4 +2,5 @@ TEMPLATE = subdirs
SUBDIRS = \
access \
kernel \
+ ssl \
socket
diff --git a/tests/benchmarks/network/ssl/qsslsocket/qsslsocket.pro b/tests/benchmarks/network/ssl/qsslsocket/qsslsocket.pro
new file mode 100644
index 0000000..da34a02
--- /dev/null
+++ b/tests/benchmarks/network/ssl/qsslsocket/qsslsocket.pro
@@ -0,0 +1,13 @@
+load(qttest_p4)
+TEMPLATE = app
+TARGET = tst_bench_qsslsocket
+DEPENDPATH += .
+INCLUDEPATH += .
+
+QT -= gui
+QT += network
+
+CONFIG += release
+
+# Input
+SOURCES += tst_qsslsocket.cpp
diff --git a/tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp
new file mode 100644
index 0000000..79f502c
--- /dev/null
+++ b/tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+#include <qcoreapplication.h>
+#include <qsslconfiguration.h>
+#include <qsslsocket.h>
+
+
+// #include "../../../../auto/network-settings.h"
+
+//TESTED_CLASS=
+//TESTED_FILES=
+
+class tst_QSslSocket : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_QSslSocket();
+ virtual ~tst_QSslSocket();
+
+
+public slots:
+ void initTestCase_data();
+ void init();
+ void cleanup();
+private slots:
+ void systemCaCertificates();
+};
+
+tst_QSslSocket::tst_QSslSocket()
+{
+}
+
+tst_QSslSocket::~tst_QSslSocket()
+{
+}
+
+void tst_QSslSocket::initTestCase_data()
+{
+}
+
+void tst_QSslSocket::init()
+{
+}
+
+void tst_QSslSocket::cleanup()
+{
+}
+
+//----------------------------------------------------------------------------------
+void tst_QSslSocket::systemCaCertificates()
+{
+ // The results of this test change if the benchmarking system changes too much.
+ // Therefore this benchmark is only good for manual regression checking between
+ // Qt versions.
+ QBENCHMARK_ONCE {
+ QList<QSslCertificate> list = QSslSocket::systemCaCertificates();
+ }
+}
+
+QTEST_MAIN(tst_QSslSocket)
+#include "tst_qsslsocket.moc"
diff --git a/tests/benchmarks/network/ssl/ssl.pro b/tests/benchmarks/network/ssl/ssl.pro
new file mode 100644
index 0000000..0c8529d
--- /dev/null
+++ b/tests/benchmarks/network/ssl/ssl.pro
@@ -0,0 +1,3 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ qsslsocket