Warning, file /kdevelop/kdev-python/duchain/tests/duchainbench.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 SPDX-FileCopyrightText: 2014 Benjamin Kaiser <benjaminjkaiser@gmail.com> 0003 0004 SPDX-License-Identifier: MIT 0005 */ 0006 0007 #ifndef PY_DUCHAINBENCH_H 0008 #define PY_DUCHAINBENCH_H 0009 0010 #include <QObject> 0011 #include <QTemporaryDir> 0012 #include "ast.h" 0013 #include <serialization/indexedstring.h> 0014 #include <language/duchain/topducontext.h> 0015 #include <tests/testfile.h> 0016 0017 namespace KDevelop { 0018 class TopDUContext; 0019 class ReferencedTopDUContext; 0020 } 0021 0022 using namespace KDevelop; 0023 0024 class DUChainBench : public QObject 0025 { 0026 Q_OBJECT 0027 public: 0028 explicit DUChainBench(QObject* parent = nullptr); 0029 void initShell(); 0030 ~DUChainBench() override; 0031 0032 KDevelop::ReferencedTopDUContext parse(const QString& code); 0033 0034 Python::CodeAst::Ptr m_ast; 0035 0036 private slots: 0037 void benchSimpleStatements(); 0038 void benchSimpleStatements_data(); 0039 0040 private: 0041 QList<KDevelop::TestFile*> createdFiles; 0042 QDir testDir; 0043 QTemporaryDir testDirOwner; 0044 }; 0045 0046 #endif // DUCHAINBENCH_H