summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/network
Commit message (Collapse)AuthorAgeFilesLines
* Benchmarks: tst_tcpserver: Remove unnecessary qprocess includeOliver Wolff2018-02-051-1/+0
| | | | | | | | The include is not needed and breaks build that do not have process support. Change-Id: I3951c24c950dd556a3b26744d8994709e294d397 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Change almost all other uses of qrand() to QRandomGeneratorThiago Macieira2017-11-081-1/+2
| | | | | | | | | | | | | | | | | | | The vast majority is actually switched to QRandomGenerator::bounded(), which gives a mostly uniform distribution over the [0, bound) range. There are very few floating point cases left, as many of those that did use floating point did not need to, after all. (I did leave some that were too ugly for me to understand) This commit also found a couple of calls to rand() instead of qrand(). This commit does not include changes to SSL code that continues to use qrand() (job for someone else): src/network/ssl/qsslkey_qt.cpp src/network/ssl/qsslsocket_mac.cpp tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Modularize configure.json/.priLars Knoll2016-09-151-0/+2
| | | | | | | | | | | | Move the different parts of configure.json/.pri into the libraries where they belong. Gui is not yet fully modularized, and contains many things related to the different QPA plugins. Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Change-Id: I6659bb29354ed1f36b95b8c69e7fce58f642053f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use qtConfig throughout in qtbaseLars Knoll2016-08-192-2/+2
| | | | | | | | | | | Use the new qtConfig macro in all pro/pri files. This required adding some feature entries, and adding {private,public}Feature to every referenced already existing entry. Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-04-052-3/+2
|\ | | | | | | | | | | | | | | | | Conflicts: examples/corelib/ipc/ipc.pro src/plugins/platforms/xcb/qxcbbackingstore.cpp tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp Change-Id: Ia006e10ff1732fe78f90138c41f05b59b49486cf
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-042-3/+2
| |\ | | | | | | | | | Change-Id: I35ca979395620e104e50b06366d0869433a4ffc2
| | * Fix QtGui dependencies in tests/benchmarksKai Pastor2016-04-012-3/+2
| | | | | | | | | | | | | | | | | | | | | Before this change, -no-gui builds failed already while running qmake. Change-Id: I3e300a16669371098589822806c5cf8aa9b801c7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Remove Windows CE from tests (others).Friedemann Kleint2016-03-312-18/+3
|/ / | | | | | | | | | | | | | | | | Remove #ifdef sections for Q_OS_WINCE, wince .pro file clauses and CE-specific files. Task-number: QTBUG-51673 Change-Id: Ibf599204f5c0daaef086edaf8fac86853db3ee14 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-217-118/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Remove QT_DISABLE_DEPRECATED_BEFORE=0 from tests not using deprecated API.Friedemann Kleint2015-09-016-6/+0
|/ | | | | Change-Id: I1955320e7639760b4383a53f37a506c8055933ef Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-117-48/+48
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-247-132/+76
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Compile fix for configuration without SSL supportMaurice Kalinowski2014-07-071-0/+2
| | | | | Change-Id: Ic0f7e2bfd1b5535d4a460a88a9152a5319ed00f6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* network: add support for the SPDY protocolPeter Hartmann2014-02-191-4/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the only supported SPDY version is 3.0. The feature needs to be enabled explicitly via QNetworkRequest::SpdyAllowedAttribute. Whether SPDY actually was used can be determined via QNetworkRequest::SpdyWasUsedAttribute from a QNetworkReply once it has been started (i.e. after the encrypted() signal has been received). Whether SPDY can be used will be determined during the SSL handshake through the TLS NPN extension (see separate commit). The following things from SPDY have not been enabled currently: * server push is not implemented, it has never been seen in the wild; in that case we just reject a stream pushed by the server, which is legit. * settings are not persisted across SPDY sessions. In practice this means that the server sends a small message upon session start telling us e.g. the number of concurrent connections. * SSL client certificates are not supported. Task-number: QTBUG-18714 [ChangeLog][QtNetwork] Added support for the SPDY protocol (version 3.0). Change-Id: I81bbe0495c24ed84e9cf8af3a9dbd63ca1e93d0d Reviewed-by: Richard J. Moore <rich@kde.org>
* WinRT: Fixed compilation of network autotests and benchmarksOliver Wolff2013-12-061-0/+8
| | | | | Change-Id: Id689f199cfb22dce231cec36faba57ab958b1bac Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* Fix compilation of the tst_qnetworkreply benchmark test with QT_NO_SSL.Friedemann Kleint2013-07-191-10/+10
| | | | | | | | | preConnectEncrypted_data() is called by preConnect_data(). Change-Id: I9a3fad294d88e4cb4d2f6132cf7a87945373bb7d Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Sérgio Martins <sergio.martins.qnx@kdab.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-07-151-2/+0
|\ | | | | | | Change-Id: I0218a1f08b89f2d56757ab35eec06799d2a1492f
| * Remove Nokia-domains in commented-out test code.Friedemann Kleint2013-07-121-2/+0
| | | | | | | | | | | | | | Task-number: QTBUG-32390 Change-Id: Ida7d54aba9cde5c472ff6bb2696d1201ba4f2199 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* | HTTP internals: do not open too many sockets when preconnectingPeter Hartmann2013-06-241-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | Each pair of (normal request, preconnect request) requires only one socket. E.g. if there is 1 preconnect request in-flight and 2 normal requests, we need only 2 sockets in total, and not 3. Therefore, we need to keep track of whether a request is preconnecting or a normal one. Task-number: QTBUG-31594 Change-Id: If92ccc35abadfa6090d64ee92bd466615909c94c Reviewed-by: Richard J. Moore <rich@kde.org>
* | QNetworkAccessManager: add public methods to pre-TCP/pre-SSL-connectPeter Hartmann2013-06-032-1/+110
|/ | | | | | | | | | | | | | | | | | | | | | | | | | If an app knows it needs to connect to a host beforehand, it can "warm up" the connection cache by making DNS lookup, TCP (and if needed SSL) handshake before the actual HTTP request is sent. When the HTTP request is made, it will be considerably faster when there is already a working connection. Here are some typical results from the benchmark: * Linux desktop with Ethernet: "http://www.google.com" full request: 279 ms, pre-connect request: 61 ms, difference: 218 ms "https://www.google.com" full request: 344 ms, pre-connect request: 60 ms, difference: 284 ms * mobile device (BlackBerry 10) with Wifi: "https://www.google.com" full request: 898 ms, pre-connect request: 159 ms, difference: 739 ms "http://www.google.com" full request: 707 ms, pre-connect request: 200 ms, difference: 507 ms Task-number: QTBUG-30771 Change-Id: I3566b7f08216ab93a39e2024ae7d1ceb7ae21891 Reviewed-by: Jonas Gastal <gastal@intel.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Giuseppe D'Angelo2013-02-171-1/+1
|\ | | | | | | refs/staging/dev
| * tests: Fix some more old references and links to NokiaSergio Ahumada2013-02-011-1/+1
| | | | | | | | | | | | | | Task-number: QTBUG-28156 Change-Id: Ifb768b167203c901c5e42ce58c9aaf3db2739320 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | SSL benchmarks: add benchmark for uploading dataPeter Hartmann2013-02-161-0/+26
|/ | | | | | | | | | All Web service APIs like Facebook, Twitter etc. use SSL for uploading pictures etc., so it is good to have a benchmark for that. Task-number: QTBUG-28764 Change-Id: I590f76ac8b6575509f1635c18c35f9fe652fa8f8 Reviewed-by: Richard J. Moore <rich@kde.org>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-186-6/+6
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* test: Remove CONFIG += testcase from tst_bench_qnetworkreply_from_cacheSergio Ahumada2012-11-071-1/+0
| | | | | | | Benchmark tests are not supposed to be run by "make check" Change-Id: I718565a8b4e71c136c7aa8f9bd95f95c5fdafab8 Reviewed-by: Rohan McGovern <rohan@mcgovern.id.au>
* Improve QByteDataBuffer::read() performance with partial readsAntti Harju2012-11-034-0/+236
| | | | | | | | | | | | | Add a read position variable to eliminate excessive memcpy'ing when reading a partial buffer. Specifically, fix performance issue of reading large files from QNetworkDiskCache in QtWebKit2. Task-number: QTBUG-27522 Change-Id: I21edc909bf9223971b2c3db5f1fa6b89c5b61c5f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Antti Harju <antti.harju@ixonos.com>
* normalise signal/slot signatures [QtNetwork tests]Marc Mutz2012-10-192-3/+3
| | | | | Change-Id: I2491cfe421a811d00759224da03580b3dcc2a091 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-226-144/+144
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-016-0/+6
| | | | | | | | | | | Qt 5.0 beta requires changing the default to the 5.0 API, disabling the deprecated code. However, tests should test (and often do) the compatibility API too, so turn it back on. Task-number: QTBUG-25053 Change-Id: I8129c3ef3cb58541c95a32d083850d9e7f768927 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QtNetwork: use nullary version of qRegisterMetaType<T>("T")Marc Mutz2012-07-251-2/+0
| | | | | | | | | | | | | | | | | Using the nullary version has the advantage that multiple calls during a program run are much more efficient, since an inlined atomic is used to store the result. It also ensures that Q_DECLARE_METATYPE(T) has been used, whereas qRegisterMetaType<T>("T") will happily register anything. So I've added the macro where it was missing, or moved it to a central place when it existed hidden. In tst_qnetworkreply, this became a bit tricky, because a private header is conditionally included, so moved the Q_DECLARE_METATYPE() into a conditional section, too. Change-Id: I71484523e4277f4697b7d4b2ddc3505375162727 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix some spelling errorsSergio Ahumada2012-07-112-2/+2
| | | | | | Change-Id: I19d3b2e9a5180b13deb828b55195404ef20be295 Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtNetwork]Thiago Macieira2012-05-041-5/+5
| | | | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I94cc301ea75cc689bcb6e2d417120cf14e36808d Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* tst_qnetworkreply: don't inherit from QSharedPointerMarc Mutz2012-03-231-17/+17
| | | | | | | | | | | | | | | QSharedPointer isn't meant to be used as a base class. Instead of inheriting from it to add implicit conversions to and from QNetworkReply*, make QNetworkReplyPtr a typedef, overload two oft-used functions to take a QNetworkReplyPtr in addition to QNetworkReply*, and otherwise make the conversions explicit. Change-Id: I1eff1793a19f2d5bad1cce8de74c0786675a50f3 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix build of QNetworkReply benchmark with QT_USE_QSTRINGBUILDER.Stephen Kelly2012-03-011-2/+2
| | | | | Change-Id: Ie46126aed0d2e83dc7784c027066c789d3fd7652 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* clean up qmake-generated projectsOswald Buddenhagen2012-02-246-20/+0
| | | | | | | | remove "header" and assignmets which are defaults or bogus, reorder some assignments. Change-Id: I67403872168c890ca3b696753ceb01c605d19be7 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Test for QT_NO_SSL instead of QT_NO_OPENSSLShane Kearns2012-02-211-2/+2
| | | | | | | | Change the ifdefs in our own code (except openssl backend) to use the new configure flag. Change-Id: I8774734771c66b22164b5fae8fdb27814ac3df7b Reviewed-by: Richard J. Moore <rich@kde.org>
* Replace Q_WS_WINCE against Q_OS_WINCE.Andreas Holzammer2012-02-092-4/+4
| | | | | | | | | | Window system Macros where deprecated so use Q_OS_WINCE for now. This code will need some refactoring, but this is the first step to it. Change-Id: I5876b80ee45d4b38ac63fc7d51e775dc70bbd485 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-306-6/+6
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-236-6/+6
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update year in Nokia copyright headers.Jason McDonald2012-01-101-1/+1
| | | | | | | | The previous change missed some headers from years prior to 2011, and a few new files were merged after the previous change. Change-Id: Ib7d1a2b7062228c2a5373da64242b2ee1f0981e1 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove execute permission from files that don't need it.Jason McDonald2012-01-101-0/+0
| | | | | Change-Id: Ib92875289cdd9831f35301c566fb567acc725bb6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Remove all non-inline of qMalloc/qFree/qRealloc.Robin Burchell2012-01-061-4/+4
| | | | | | | | | | | | We're trying to deprecate these, so don't use them anymore. The inline uses of these have been left intact, for the moment. Inline code will need to create their own non-inline allocation methods (for future-proofing to allow alterations in how e.g. individual containers allocate) Change-Id: I1071a487c25e95b7bb81a3327b20c5481fb5ed22 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-055-5/+5
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Reimplement QIODevice::reset() properlyBradley T. Hughes2011-12-211-1/+1
| | | | | | | | | | | | | | | | | | The reset() function is not const. tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp:324: warning: 'FixedSizeDataGenerator::reset' hides overloaded virtual function [-Woverloaded-virtual] virtual bool reset() const{ ^ src/corelib/io/qiodevice.h:112: hidden overloaded virtual function 'QIODevice::reset' declared here virtual bool reset(); ^ Change-Id: I022d902147f9c8fb71bee8c3e21b963b2d7bec55 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Remove TESTED_CLASS/TESTED_FILES comments from tests.Jason McDonald2011-12-062-6/+0
| | | | | | | | | These comments were mostly empty or inaccurate. Appropriate naming of tests and appropriate placement of tests within the directory tree provide more reliable indicators of what is being tested. Change-Id: Ib6bf373d9e79917e4ab1417ee5c1264a2c2d7027 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix sanity check of network test serverJason McDonald2011-11-283-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of Qt's autotests depend on access to a test server. For each test that used the test server, tests/auto/network-settings.h created a global object to verify at startup that host lookups to the test server will succeed (and abort the test otherwise). There are two problems with that approach: First, the sanity check happens before main(), and thus before the test framework has started logging test results. This means that if the sanity check aborts the test, the failure message will not be visible in the test output if logging to a file or will cause the output to be malformed if logging to the console in XML format. Second, since Qt 4.7, the host lookup uses a class that connects to the QCoreApplication instance, which doesn't exist before main(), and this caused all tests that included network-settings.h to output an error message from QObject::connect() at the beginning of the test. Both of these problems are solved by removing the global object from network-settings.h and instead performing the sanity check in the initTestCase() function of each test. Task-number: QTBUG-22876 Change-Id: Id49c1826906327bf571686cc11527f0265e5af44 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Don't depend on moc to disable test functions.Jason McDonald2011-11-181-5/+3
| | | | | | | | | | | | | | | | | | | | | The moc tool is not aware of all defines (particularly those that are compiler builtins) and does not correctly evaluate others that depend on compiler builtins, such as Q_OS_FOO. This commit reverts parts of the following commits, but is not a complete fix as there were many instances of this problem in the tests prior to those commits: 924d810dbdcd5b5b0fa860922b2487ea9062d002 8aaff6751038b88d17e23be6fcee945771297c5b 338d3f11973412047c2c9cd41cbd0c961d738ef3 a55034062ba2bf73a9f1ed3d9cf31745b38149e3 253497b7446c7d723aa3bdd7152e25d6852f2604 7cfad460c56319ba89c4a3a0bbcb2e54ab1cdbc6 9d2ff58f3642828e494e7e9b2df7dbb8e2cd408f 0cf6baa2d61ebaad2a2a0530c37f27e719b68f4b Change-Id: I947d797fe3ec76139ba1b55561cea569895662c5 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fixed typo: private-tests -> private_testsJo Asplin2011-11-091-1/+1
| | | | | Change-Id: I8bc53061a6b7a8605290dca0d90e67d7660b4c33 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* benchmarks: eliminated usage of qttest_p4.prfRohan McGovern2011-10-256-35/+5
| | | | | | | | | qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4. It enables various crufty undocumented magic, of dubious value. Stop using it, and explicitly enable the things from it which we want. Change-Id: I48ab0ee64d8348cada2e6c7b27c67b6bbc36280d Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Deprecate QDesktopServices::storageLocation/displayNameDavid Faure2011-10-231-9/+9
| | | | | | | Which required porting the related unittests to qstandardpaths Change-Id: I6eb63c46845f05cd29cc42b59872707526277c90 Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>