File indexing completed on 2024-04-21 04:36:20
0001 /* 0002 Copyright 2009 Milian Wolff <mail@milianw.de> 0003 0004 This library is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU Library General Public 0006 License version 2 as published by the Free Software Foundation. 0007 0008 This library is distributed in the hope that it will be useful, 0009 but WITHOUT ANY WARRANTY; without even the implied warranty of 0010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0011 Library General Public License for more details. 0012 0013 You should have received a copy of the GNU Library General Public License 0014 along with this library; see the file COPYING.LIB. If not, write to 0015 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0016 Boston, MA 02110-1301, USA. 0017 */ 0018 #ifndef BENCHMARKS_H 0019 #define BENCHMARKS_H 0020 0021 #include <QObject> 0022 0023 namespace KDevPG 0024 { 0025 class Benchmarks : public QObject 0026 { 0027 Q_OBJECT 0028 0029 public Q_SLOTS: 0030 void initTestCase(); 0031 0032 private Q_SLOTS: 0033 /// benchmarks on of the PositionAtAlgorithms 0034 void positionAt(); 0035 void positionAt_data(); 0036 /// verifies the new PositionAtAlgorithms by comparing to 0037 /// the initial algorithm 0038 void verifyPositionAt(); 0039 void verifyPositionAt_data(); 0040 0041 private: 0042 enum PositionAtAlgorithms { 0043 CurrentPositionAt, 0044 QtBinaryPositionAt, 0045 STLBinaryPositionAt 0046 }; 0047 enum AccessType { 0048 LinearAccess, 0049 RandomAccess 0050 }; 0051 }; 0052 0053 } 0054 0055 #endif // BENCHMARKS_H