summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/core
Commit message (Collapse)AuthorAgeFilesLines
* Skip benchmark on WinCE for nowLaszlo Agocs2015-02-141-1/+1
| | | | | | | | | | | Some of them do not compile: tst_bench_qresourcesmanager.cpp(115) : error C2039: 'time' : is not a member of 'std' For now let's just skip them in wince builds. Change-Id: Id58ef24431abeb2916836e7ab5a9a05f8c8eeb01 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Copyright header change.Mika Salmela2015-02-094-76/+56
| | | | | | | | As for preparation for Qt5.5 release the copyright header is updated to correspond the current license requirements. Change-Id: I36632918b66f455539453b42c369689fb11298ec Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make QCircularBuffer and QBoundedCircularBuffer privateSean Harmer2014-11-192-2/+2
| | | | | Change-Id: I298fbaf819a118a5da4453082ec7f1484835480a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename QResourcesManager -> QResourceManager and make privateSean Harmer2014-11-184-24/+24
| | | | | | | | Once we are happy with the API we can make this public for a future release. Change-Id: I914f087e10adddbadac1649a8b889b9f53f82fd2 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add benchmark suite for QFrameAllocator.Milian Wolff2014-11-143-1/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Results for instr:k perf counter on my machine are: ********* Start testing of tst_QFrameAllocator ********* Config: Using QtTest library 5.5.0, Qt 5.5.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 4.9.2) PASS : tst_QFrameAllocator::initTestCase() PASS : tst_QFrameAllocator::benchmarkAllocateSmall() RESULT : tst_QFrameAllocator::benchmarkAllocateSmall(): 1,060,442 instructions per iteration (total: 1,060,442, iterations: 1) PASS : tst_QFrameAllocator::benchmarkAllocateBig() RESULT : tst_QFrameAllocator::benchmarkAllocateBig(): 1,145,940 instructions per iteration (total: 1,145,940, iterations: 1) PASS : tst_QFrameAllocator::benchmarkDeallocateSmall() RESULT : tst_QFrameAllocator::benchmarkDeallocateSmall(): 901,579 instructions per iteration (total: 901,579, iterations: 1) PASS : tst_QFrameAllocator::benchmarkDeallocateBig() RESULT : tst_QFrameAllocator::benchmarkDeallocateBig(): 901,579 instructions per iteration (total: 901,579, iterations: 1) PASS : tst_QFrameAllocator::benchmarkAllocateRaw() RESULT : tst_QFrameAllocator::benchmarkAllocateRaw(): 1,067,539 instructions per iteration (total: 1,067,539, iterations: 1) PASS : tst_QFrameAllocator::benchmarkDeallocateRaw() RESULT : tst_QFrameAllocator::benchmarkDeallocateRaw(): 971,701 instructions per iteration (total: 971,701, iterations: 1) PASS : tst_QFrameAllocator::cleanupTestCase() Totals: 8 passed, 0 failed, 0 skipped, 0 blacklisted ********* Finished testing of tst_QFrameAllocator ********* Change-Id: Iae2bcd53d4efcff4b8486b4571dc1d1acfcbc19d Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Optimize ArrayPreallocationPolicy.Milian Wolff2014-10-254-28/+53
| | | | | | | | | | | | | | | | | | The tricks applied are identical to those done previously for ArrayAllocationPolicy: We remove the obsolete hash for the index mapping and instead use pointer differences directly, which is much faster and reduces the memory consumption. Some variables are also renamed to better reflect common allocator nomenclature. The added benchmark shows a reduction of the instruction count by a factor of about 10. Change-Id: Icabc354ab9e1e8ea0b1dc83c71a2f2cfe49d1da0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QResourcesManager: Added dynamic ArrayAllocation policyPaul Lemire2014-10-256-1/+381
| | | | | | | | | | | | | Startup memory usage is now 10% of what it was before. Unit tests corrected and benchmarks added. Benchmarks: DynamicArrayPolicy QResourcesManager Change-Id: Idaeedba5156ac2d6a0a494e7399d9dcb141dc81c Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add QCircularBuffer and testSean Harmer2014-04-173-0/+109
This is different to QtCore's QRingBuffer. QRingBuffer deals with raw bytes with a non-contiguous list of QByteArrays. QCircularBuffer is strongly typed and the data is guaranteed to be stored in a contiguous block of memory. Although the start/end of the buffer may not correspond to the start/end of the block of memory once it has reached capacity and wraps around. Done-with: Andreas Hartmetz and Marc Mutz Change-Id: Id03ad308b13fb359604d19474d892ff22c1e9b93 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>