summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/network/access
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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-311-15/+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-214-67/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-013-3/+0
|/ | | | | Change-Id: I1955320e7639760b4383a53f37a506c8055933ef Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-114-27/+27
| | | | | | | | | | | | | | | | | | 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-244-75/+43
| | | | | | | | | - 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>
* 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>
* 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-183-3/+3
| | | | | 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-191-2/+2
| | | | | Change-Id: I2491cfe421a811d00759224da03580b3dcc2a091 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-223-72/+72
| | | | | | | | 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-013-0/+3
| | | | | | | | | | | 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>
* Fix some spelling errorsSergio Ahumada2012-07-111-1/+1
| | | | | | 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-243-11/+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-091-3/+3
| | | | | | | | | | 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-303-3/+3
| | | | | | | | | | 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-233-3/+3
| | | | | | | 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 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-052-2/+2
| | | | | 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>
* Fix sanity check of network test serverJason McDonald2011-11-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* benchmarks: eliminated usage of qttest_p4.prfRohan McGovern2011-10-253-17/+2
| | | | | | | | | 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>
* Remove Symbian-specific code from tests.Jason McDonald2011-09-293-30/+5
| | | | | | | | | Symbian is not a supported platform for Qt5, so this code is no longer required. Change-Id: I1172e6a42d518490e63e9599bf10579df08259aa Reviewed-on: http://codereview.qt-project.org/5657 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* tests: do not run benchmarks by default in 'make check'Rohan McGovern2011-07-193-0/+12
| | | | | | | | | | | | | | | | `make check' is intended primarily for running functional tests. For the most part, it does not make sense to run benchmarks in the same test environment as the functional tests. Also, the runtime for some of these benchmarks is quite long, and some of them share the same name as existing functional tests. These are problematic. Change-Id: I2ca4cfa24c73280a0b73e51423007eaff92085b8 Reviewed-on: http://codereview.qt.nokia.com/1794 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QNetworkReply benchmark: Benchmark a chain of SSL requestsMarkus Goetz2011-07-061-0/+82
| | | | | | | Change-Id: Ic74b4189c5b8e7fc8f86d76973d628c63989d32d Reviewed-on: http://codereview.qt.nokia.com/1010 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-243-51/+51
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Tests: Fix some compile warnings.Friedemann Kleint2011-05-191-1/+1
| | | | As they are now compiled by default.
* Initial import from the monolithic Qt.Qt by Nokia2011-04-277-0/+1421
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12