summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks
Commit message (Collapse)AuthorAgeFilesLines
* fix QUtf8 codec to disallow codes in range [U+fdd0..U+fdef]Konstantin Ritt2012-04-111-1/+1
| | | | | | | | | 0xfdef-0xfdd0 is definitely 31 and not 15 :) also fix all copy-pastes of this code (greping for '0xfdd0' helps ;) Change-Id: I8f3bd4fd9d85f9de066f0f5df378b9188c12bd48 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Significantly speed up insertion into QJsonObject/ArrayLars Knoll2012-03-221-0/+28
| | | | | | | | | | | | The code was only allocating memory for the next insertion leading to a reallocation of the whole data for every single insertion. The code now reserves some space and uses a decent growth strategy to avoid repeated reallocs. Change-Id: I48b0feab71ba8ca73e7037f8460080f198b2f009 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Added extra tests to json benchmarkKurt Korbatits2012-03-221-0/+32
| | | | | | | | | | - Added toByteArray() and fromByteArray() benchmark tests. Performance tests to measure QVariantMap to bytearray and bytearray to QVariantMap. Use case: Interprocess communications via local socket Change-Id: If5e94ff870890b2ebb665f3cc38f5c33b34547f4 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fixed benchmarks to work from install directoryKurt Korbatits2012-03-1918-32/+104
| | | | | | | | | - Changed benchmarks to use TESTDATA and QFINDTESTDATA - Fixed up targets all use tst_bench_ syntax Change-Id: I5c2936702e248478f5df225ce38893158ee22d7f Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* use $$QT_BUILD_TREE instead of $$(QTDIR)Oswald Buddenhagen2012-03-081-2/+2
| | | | | | | it's a "tad" more reliable Change-Id: I7207daa6869d1682719cc357794cf6efff496225 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* chiptester benchmark: compileMarc Mutz2012-03-081-0/+1
| | | | | | | | The implementation uses QScrollBar, which is no longer included by <QtGui>. Change-Id: I2422cfccc427179ca71e9a3195f16bd637925fb3 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* examples: use QVector<QPointF> instead of QList<QPointF>Marc Mutz2012-03-082-2/+2
| | | | | | | | | | | QPointF is in the category of types for which QList is needlessly inefficient (elements are copy-constructed onto the heap and held through pointers). Use a vector instead. This is consistent with the QPainter API. Change-Id: Id0e910c067a60d12fbc175e7ee7da824834be374 Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add benchmark for QMetaType::create().Jędrzej Nowacki2012-03-071-0/+21
| | | | | | | A case of a custom type creation was not covered before. Change-Id: Icd2a7d63633f8e40d9d4a8a26e0eb0896fc85ec8 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-03-047-20/+20
|\ | | | | | | | | | | | | | | | | | | Conflicts: dist/changes-5.0.0 mkspecs/features/qt_module_config.prf qmake/project.cpp qmake/property.cpp Change-Id: I6e4af40743a9aeff8ed18533a48036e332acc296
| * Make some tests and benchmarks pass with QT_NO_QSTRINGBUILDERStephen Kelly2012-03-014-16/+16
| | | | | | | | | | Change-Id: I6c91a613007043d0f26ac11e98353a0b9ce646ae Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * QEvent (and subclasses): make ctors explicitMarc Mutz2012-03-012-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Do this regardless of whether the event subclass is public API or only used in examples. Examples are examples, used by others as templates or even copied verbatim, so they should also follow sound engineering rules. Anyway, there's only one in examples/... Change-Id: I586ff16407a956c9e89288fdd4377eed73f45c0f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.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>
* | Remove qhash_faster.Robin Burchell2012-02-293-73/+0
| | | | | | | | | | | | | | | | It's not faster under _any_ metric than the new algorithm, and it loses a lot of spread which is a bad thing. Change-Id: Ic87258f1c887822ffea1cb1517355564fabc3c26 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* | Copy Qt 4's QString hash algorithm.Robin Burchell2012-02-293-4/+32
| | | | | | | | | | | | | | | | | | | | We must do this the same way we do all other hash algorithms for fair comparison, as otherwise, the call to the PLT unfairly penalises QHash<QString>'s results, as it's in a different shared object. Change-Id: I69c891f5a97dcccdfcfbdbf32796f86242a42963 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Move data generation to initTestCase() method and store the results.Robin Burchell2012-02-291-72/+58
| | | | | | | | | | | | | | | | | | Per the comments on Ie4100a1ca4dbe7bf1cd73de883a9854377ac2f5e, having Q_ASSERT was not a good idea, and data functions can't really handle QVERIFY/QCOMPARE/etc, so do this in initTestCase instead. Change-Id: I19e61dec7fe415bb1fa0f53a2920d99b8c7c8ea7 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* | Add test data for string forms of numbers.Robin Burchell2012-02-291-0/+12
| | | | | | | | | | | | | | Similar to the UUID benchmark, but won't have any non-numerical characters. Change-Id: I7487c97cab96fd53c180fe12061e7be3ca96e883 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* | Add a test using lots of similar strings.Robin Burchell2012-02-291-0/+36
|/ | | | | | | | This attempts to emulate a dictionary usecase of sorts, done in code to avoid bloating the git repository by adding an actual word list. Change-Id: I878bc4af8877ba780ee699932f240c0d9c8ff12c Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* clean up qmake-generated projectsOswald Buddenhagen2012-02-2427-89/+11
| | | | | | | | remove "header" and assignmets which are defaults or bogus, reorder some assignments. Change-Id: I67403872168c890ca3b696753ceb01c605d19be7 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Drop file-engine abstraction from public APIJoão Abecasis2012-02-222-5/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This abstraction imposed serious performance penalties and is being dropped from the public API. In particular, by allowing file names to be arbitrarily hijacked by different file engines, and requiring engines to be instantiated in order to decide, it imposed unnecessary overhead on all file operations. Another flaw in the design with direct impact on performance is how engines have no way to provide (or retain) additional information obtained when querying the filesystem. In many places this has meant repeated operations on the file system, where useful information is immediately discarded to be queried again subsequently. For Qt 4.8 a major refactoring of the code base took place to allow bypassing the file-engine abstraction in select places, with considerable performance gains observed. In Qt 5 it is expected we'll be able to take this further, reaping even more benefits, but the abstraction has to go. [Dropping this now does not preclude that virtual file systems make an appearance in Qt at a later point in Qt 5's lifecycle. Hopefully with a new and improved abstraction.] Forward declarations for QFileExtension(Result) were dropped, as the classes were never used or defined. Tests using "internalized" classes will only fully run on developer builds. QFSFileEngine was removed altogether from exception safety test, as it isn't its intent to test internal API. Change-Id: Ie910e6c2628be202ea9e05366b091d6d529b246b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@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>
* Use static-less QMetaType API in QVariant.Jędrzej Nowacki2012-02-161-0/+2
| | | | | | | | | This patch improves performance when constructing a custom type in a QVariant by ~ 7-20% (instructions count) depending on the type size and metatype attributes. Change-Id: Ic2707ff5abd689b66e23c1794f111504bf9b3b01 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Implement new static less API for QMetaType.Jędrzej Nowacki2012-02-161-1/+53
| | | | | | | | | | | | | | Currently QMetaType API contains almost only static methods. This works nice until someone needs more information or needs to do more operations on a type. In this case every function call has to do type dispatch. This API allows to avoid redundant type dispatching, by caching a type information in a QMetaType instance. It gives significant performance boost especially for custom types (up to 9x). Change-Id: I223d066268402e072e41ca1d0a3e7bc160655d7f Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Add QMetaType::FirstCoreType enum value.Jędrzej Nowacki2012-02-162-2/+2
| | | | | | | We should not assume that the first type id is 0. Change-Id: I17ba6ba57e97ebd495904bfd11235fe458f214e5 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Add a testcase of a list of UUIDs in string form.Robin Burchell2012-02-141-6/+30
| | | | | | | | | | UUIDs are a good testcase, because the textual content is all fairly similar. This also changes data generation to be a little neater now that we're starting to get multiple pieces of data. Change-Id: Ie4100a1ca4dbe7bf1cd73de883a9854377ac2f5e Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Replace Q_WS_WINCE against Q_OS_WINCE.Andreas Holzammer2012-02-095-7/+7
| | | | | | | | | | 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>
* tests: do not run benchmarks by default in 'make check'Sergio Ahumada2012-02-022-2/+0
| | | | | | | | | `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. Change-Id: I79f867fdab295bdbd4c4b3c785dfd7ede520022e Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Adding a QHeaderView benchmarkThorbjørn Lund Martsum2012-02-013-1/+273
| | | | | | | | | | This is a small QHeaderView benchmark. It measures visualIndexAt, hideSection, showSecion, moveSection, insert, remove and trunc rows. Change-Id: Ibca6a2e130f4ab27d68f51e5e341a78579abd1bf Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Allow function types to be registered without workaroundsJoão Abecasis2012-01-311-15/+0
| | | | | | | | | | | | | | | | | Commit 4b8ceb41aed352f10d36db5284453f425dbc5f3f added the requirement that pointed-to types need to be registered when registering pointer types. Unfortunately, the implementation also affects function pointer types. This change whitelists 0, 1, 2 and 3 argument functions as not deriving from QObject, forgoing the need to workaround details of the type registration implementation when registering those function pointer types. Change-Id: I4d855e9d70a8179a6e31b84623ad5bf063e0d6d8 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Moving tiff image format support and libtiff out of qtbaseaavit2012-01-319-2/+0
| | | | | | | | | | The tiff plugin and bundled libtiff is moving to the qtimageformats project on Gerrit. Task-number: QTBUG-23887 Change-Id: I4c848232fdccddd7e7f54215f9eaa78dc4c3a53d Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove Symbian specific code from qtbase.Xizhi Zhu2012-01-311-20/+1
| | | | | Change-Id: I27d37d914b71e1e43c94e2a975ffec49e1ecd456 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update contact address in license headers.Jason McDonald2012-01-311-1/+1
| | | | | Change-Id: I35bf916087511f26bfeb49ceb3256d9a20fbc1c0 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-30171-170/+171
| | | | | | | | | | 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>
* QHash benchmark: improve Java's hashGiuseppe D'Angelo2012-01-271-0/+11
| | | | | | | | Added a bit of documentation to the Java-like hashing function. Change-Id: I3f44eee305d91b76f0f89cd1acf21f6430b9482b Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* QHash benchmark: remove unused variablesGiuseppe D'Angelo2012-01-271-3/+0
| | | | | | Change-Id: Ib5abc171fb8fb70e2f73ac92ca22dc09146d8a55 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Remove QTextControl and QLineControl.Andrew den Exter2012-01-251-63/+0
| | | | | | | | QtWidgets and QtDeclarative now both have their own versions of these so there's no need to keep them around any longer. Change-Id: I9c2201c8495a0a0816e2af16c8f647fcad991479 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Cleanup mess in public type ids.Jędrzej Nowacki2012-01-252-4/+0
| | | | | | | | | | | | | | | | | | There is no reason to keep two separated core types sets. It couldn't be fixed before Qt5 because of binary compatibility promise. This patch merges QMetaType core types with ext core types. This "simple" operation consists of: - QDataStream version was incremented, because type ids are saved in QVariant's data stream. - QMetaType LastExtCoreType and FirstExtCoreType were replaced by LastCoreType, FirstCoreType and new QMetaType::HighestInternalId. - New tests checking QVariant data stream for Qt4 and for Qt5 versions were added. Change-Id: I02dd74d29317365c297a789a4eb7c9c5edc3b231 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-252-2/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove support for the MNG file format and the bundled libmngaavit2012-01-256-6/+0
| | | | | | | | | | | | | The MNG file format is generally abandoned, and libmng has been unmaintained for several years. The MNG plugin and bundled libmng has been moved to the qtimageformats project on Gerrit. Task-number: QTBUG-21869 Change-Id: I946432347014ffde2b72307a5f8b166ca5553602 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Import json support from playground/qtbinaryjsonLars Knoll2012-01-244-1/+153
| | | | | | | | | | | | | This imports the JSON support for Qt 5 from playground/qtbinaryjson. It adds a fast, fully compliant json parser, a convenient C++ API, conversion to and from QVariants and a binary format for JSON that is extremely fast to use together with the C++ API. Change-Id: If9e3a21a4241d388d0abaa446b6824f9cc6edb1c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Store the is-a QObject fact with the metatype declaration.Stephen Kelly2012-01-241-0/+15
| | | | | | | | | | | | | | This is a source incompatible change for Q_DECLARE_METATYPE(T*), which now requires T to be fully defined. The consequences of this are: * Forward declared types can no longer be declared as a metatype. (though this is a very uncommon thing to do). There is a trivial workaround where necessary. Change-Id: Id74c40088b8c0b466fcd7c55abd616f69acc82c8 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add the capability to use multiple data sources for qhash benchmark.Robin Burchell2012-01-242-20/+31
| | | | | | | More data sources to be added in followup commits. Change-Id: I0393119b36ac5d88fc2c5c8d46b000d13d5ca996 Reviewed-by: Richard J. Moore <rich@kde.org>
* Remove executive summary.Robin Burchell2012-01-241-27/+0
| | | | | | | | | | | | It isn't necessarily that hashing the whole string is the main problem, as the recently added java string benchmark appears to show, which means the original purpose of this benchmark is rather voided. This removal allows gradually repurposing the test towards providing general benchmarks of QHash performance. Change-Id: Iaab0a3b493387dcce99240632342235ed9c44d88 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Move test files around.Robin Burchell2012-01-244-4/+4
| | | | | | | | | main.cpp is easier for my muscle memory to remember than qhash_string as it is used by a number of other tests. Change-Id: I044f995d55a4ff1328dde0ae27b6e36a80114c38 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-23169-169/+169
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Introduce a qalgorithms benchmark.Robin Burchell2012-01-214-1/+147
| | | | | | | | Based on the unit test for data production. Change-Id: I88a411c0079b251d3682c3fbf9fe7ed1b5457a7e Reviewed-by: Anselmo L. S. Melo <anselmo.melo@openbossa.org> Reviewed-by: Richard J. Moore <rich@kde.org>
* Add a string hash implementation similar to the one in Java.Robin Burchell2012-01-203-0/+41
| | | | | | | | | | | | | | | | | | | | | This uses a similar runtime to the approach of sampling part of the string, with the benefit that it doesn't reduce the sampling to subsections of the string. Ironically, Java used to only sample parts of the string as well, but found that it produced too many collisions with certain string types, so they moved to use this method. RESULT : tst_QHash::qhash_qt4(): 0.0537 msecs per iteration (total: 110, iterations: 2048) PASS : tst_QHash::qhash_qt4() RESULT : tst_QHash::qhash_faster(): 0.015 msecs per iteration (total: 62, iterations: 4096) PASS : tst_QHash::qhash_faster() RESULT : tst_QHash::javaString(): 0.016 msecs per iteration (total: 66, iterations: 4096) Change-Id: Icb5da341ab6445163f4217650a0bdb3903e50210 Reviewed-by: hjk <qthjk@ovi.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>
* Add V3(md5) and V5(sha1) version for DCE in QUuidLiang Qi2012-01-101-0/+20
| | | | | | | | | | Add the above versions based on RFC4122 standard. Done-with: Hagen Rother Task-number: QTBUG-23071 Change-Id: Ieb90925374d1e3c85011b899b8dd3bb1a608c561 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Remove execute permission from files that don't need it.Jason McDonald2012-01-104-0/+0
| | | | | Change-Id: Ib92875289cdd9831f35301c566fb567acc725bb6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Remove the Q_TYPENAME define.Stephen Kelly2012-01-081-2/+2
| | | | | | | | | | | | | It is mostly not used (most places in Qt use typename directly), so is already not very useful. For example typename is used in: QDataStream& operator<<(QDataStream& s, const QVector<T>& v) Change-Id: I85337ad7d8d4ebbb424bfa2ab9a356456ff3e90f Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>