File indexing completed on 2025-02-16 04:05:07
0001 /* 0002 * SPDX-FileCopyrightText: 2010 Lukáš Tvrdý lukast.dev @gmail.com 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KIS_RANDOM_ITERATOR_BENCHMARK_H 0008 #define KIS_RANDOM_ITERATOR_BENCHMARK_H 0009 0010 #include <simpletest.h> 0011 0012 class KisPaintDevice; 0013 class KoColor; 0014 class KoColorSpace; 0015 0016 0017 class KisRandomIteratorBenchmark : public QObject 0018 { 0019 Q_OBJECT 0020 0021 private: 0022 const KoColorSpace * m_colorSpace; 0023 KisPaintDevice * m_device; 0024 KoColor * m_color; 0025 private Q_SLOTS: 0026 void initTestCase(); 0027 void cleanupTestCase(); 0028 0029 void benchmarkCreation(); 0030 0031 // memcpy from KoColor to device 0032 void benchmarkWriteBytes(); 0033 // memcpy from device to KoColor 0034 void benchmarkReadBytes(); 0035 // const vline iterator used 0036 void benchmarkConstReadBytes(); 0037 // copy from one device to another 0038 void benchmarkReadWriteBytes(); 0039 // randomly copy data 0040 void benchmarkTotalRandom(); 0041 // randomly copy data 0042 void benchmarkTotalRandomConst(); 0043 // tile by tile benchmark 0044 void benchmarkTileByTileWrite(); 0045 0046 void benchmarkNoMemCpy(); 0047 void benchmarkConstNoMemCpy(); 0048 void benchmarkTwoIteratorsNoMemCpy(); 0049 }; 0050 0051 #endif