| 1 |
/* |
| 2 |
* Copyright (C) 2013-2015, 2019 by the Konclude Developer Team. |
| 3 |
* |
| 4 |
* This file is part of the reasoning system Konclude. |
| 5 |
* For details and support, see <http://konclude.com/>. |
| 6 |
* |
| 7 |
* Konclude is free software: you can redistribute it and/or modify |
| 8 |
* it under the terms of version 3 of the GNU Lesser General Public |
| 9 |
* License (LGPLv3) as published by the Free Software Foundation. |
| 10 |
* |
| 11 |
* Konclude is distributed in the hope that it will be useful, |
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
* GNU (Lesser) General Public License for more details. |
| 15 |
* |
| 16 |
* You should have received a copy of the GNU (Lesser) General Public |
| 17 |
* License along with Konclude. If not, see <http://www.gnu.org/licenses/>. |
| 18 |
* |
| 19 |
*/ |
| 20 |
|
| 21 |
#ifndef KONCLUDE_TEST_EVALUATION_CREASONEREVALUATIONMANAGERTHREAD_H |
| 22 |
#define KONCLUDE_TEST_EVALUATION_CREASONEREVALUATIONMANAGERTHREAD_H |
| 23 |
|
| 24 |
// Libraries includes |
| 25 |
#include <QString> |
| 26 |
#include <QSet> |
| 27 |
|
| 28 |
|
| 29 |
// Namespace includes |
| 30 |
#include "EvaluationSettings.h" |
| 31 |
#include "CReasonerEvaluationManager.h" |
| 32 |
#include "CReasonerEvaluationExecutorThread.h" |
| 33 |
#include "CReasonerEvaluationTestsuite.h" |
| 34 |
|
| 35 |
#include "CReasonerEvaluationCollector.h" |
| 36 |
#include "CReasonerEvaluationClassificationTimeExtractor.h" |
| 37 |
#include "CReasonerEvaluationGroupRequestReasonerComparisonAnalyser.h" |
| 38 |
#include "CReasonerEvaluationAvaragerSummarizer.h" |
| 39 |
#include "CReasonerEvaluationGroupRequestReasonerCSVComparisonAnalyser.h" |
| 40 |
#include "CReasonerEvaluationGroupRequestReasonerWithMeanMinMaxCSVComparisonAnalyser.h" |
| 41 |
#include "CReasonerEvaluationGroupReasonerWinnerCountCSVComparisonAnalyser.h" |
| 42 |
#include "CReasonerEvaluationHighchartPlotter.h" |
| 43 |
#include "CReasonerEvaluationPathConverter.h" |
| 44 |
#include "CReasonerEvaluationExpressivitySelectorFactory.h" |
| 45 |
#include "CReasonerEvaluationDirectoryStructureSelectorFactory.h" |
| 46 |
#include "CReasonerEvaluationLoadingTimeExtractor.h" |
| 47 |
#include "CReasonerEvaluationAnalyserChecker.h" |
| 48 |
#include "CReasonerEvaluationResponseFileExtractor.h" |
| 49 |
#include "CReasonerEvaluationResponseFileListSummarizer.h" |
| 50 |
#include "CReasonerEvaluationGroupRequestReasonerResultDifferenceAnalyser.h" |
| 51 |
#include "CReasonerEvaluationResponseTimeExtractor.h" |
| 52 |
#include "CReasonerEvaluationGroupRequestReasonerAccumulatedCSVComparisonAnalyser.h" |
| 53 |
#include "CReasonerEvaluationHTMLNavigationOverviewSummarizer.h" |
| 54 |
#include "CReasonerEvaluationGroupRequestReasonerErrorAnalyser.h" |
| 55 |
#include "CReasonerEvaluationTimeoutErrorExtractor.h" |
| 56 |
#include "CReasonerEvaluationProfileSelectorFactory.h" |
| 57 |
#include "CReasonerEvaluationSpecifiedTimeExtractor.h" |
| 58 |
#include "CReasonerEvaluationDataValueCacher.h" |
| 59 |
#include "CReasonerEvaluationGroupRequestReasonerBucketCSVComparisonAnalyser.h" |
| 60 |
#include "CReasonerEvaluationGroupRequestReasonerAccumulatedCountCSVComparisonAnalyser.h" |
| 61 |
#include "CReasonerEvaluationGroupRequestStatisticsCSVComparisonAnalyser.h" |
| 62 |
#include "CReasonerEvaluationStatisticsValueExtractor.h" |
| 63 |
#include "CReasonerEvaluationStatisticsNameCollectingExtractor.h" |
| 64 |
#include "CReasonerEvaluationGroupRequestReasonerStatisticValueCSVComparisonAnalyser.h" |
| 65 |
#include "CReasonerEvaluationGroupRequestReasonerStatisticValueCollectingCSVComparisonAnalyser.h" |
| 66 |
#include "CReasonerEvaluationGroupRequestReasonerResultSubsumptionAnalyser.h" |
| 67 |
#include "CReasonerEvaluationGroupRequestReasonerResultCountingAnalyser.h" |
| 68 |
#include "CReasonerEvaluationGroupRequestReasonerMemoryUsageAnalyser.h" |
| 69 |
|
| 70 |
// Other includes |
| 71 |
#include "Config/CConfiguration.h" |
| 72 |
|
| 73 |
#include "Concurrent/CThread.h" |
| 74 |
|
| 75 |
#include "Test/Evaluation/Events/CReasonerEvaluationProgramEvent.h" |
| 76 |
|
| 77 |
#include "Control/Command/CConfigManagerReader.h" |
| 78 |
|
| 79 |
#include "Control/Command/Records/CStartProcessCommandRecord.h" |
| 80 |
#include "Control/Command/Records/CStopProcessCommandRecord.h" |
| 81 |
#include "Control/Command/Records/CFinishProcessCommandRecord.h" |
| 82 |
|
| 83 |
// Logger includes |
| 84 |
#include "Logger/CLogger.h" |
| 85 |
#include "Logger/CLogIdentifier.h" |
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
namespace Konclude { |
| 90 |
|
| 91 |
using namespace Config; |
| 92 |
using namespace Logger; |
| 93 |
using namespace Concurrent; |
| 94 |
using namespace Control::Command; |
| 95 |
using namespace Control::Command::Records; |
| 96 |
using namespace Control::Command::Instructions; |
| 97 |
|
| 98 |
namespace Test { |
| 99 |
|
| 100 |
namespace Evaluation { |
| 101 |
|
| 102 |
using namespace Evaluation::Events; |
| 103 |
|
| 104 |
|
| 105 |
/*! |
| 106 |
* |
| 107 |
* \class CReasonerEvaluationManagerThread |
| 108 |
* \author Andreas Steigmiller |
| 109 |
* \version 0.1 |
| 110 |
* \brief TODO |
| 111 |
* |
| 112 |
*/ |
| 113 |
class CReasonerEvaluationManagerThread : public CThread, public CReasonerEvaluationManager, public CLogIdentifier { |
| 114 |
|
| 115 |
// public methods |
| 116 |
public: |
| 117 |
//! Constructor |
| 118 |
CReasonerEvaluationManagerThread(CConfiguration *config); |
| 119 |
|
| 120 |
//! Destructor |
| 121 |
virtual ~CReasonerEvaluationManagerThread(); |
| 122 |
|
| 123 |
|
| 124 |
virtual CReasonerEvaluationManager* realizeEvaluationCommand(CEvaluateTestsuiteCommand* evalTestsuiteComm); |
| 125 |
|
| 126 |
|
| 127 |
// protected methods |
| 128 |
protected: |
| 129 |
virtual bool processCustomsEvents(QEvent::Type type, CCustomEvent* event); |
| 130 |
|
| 131 |
bool evaluationProgram(CEvaluateTestsuiteCommand* evalTestsuiteComm); |
| 132 |
CReasonerEvaluationManager* analysingProgram(CEvaluateTestsuiteCommand* evalTestsuiteComm); |
| 133 |
bool analyseTimes(const QString& analysingDirectoryString, const QString& evaluationProgramName, const QString& plattform, const QString& analyserOutputDirectoryName, const QString& requestDirectory, |
| 134 |
cint64 testCountCut, cint64 timeoutCut, cint64 errorPunishmentTime, CReasonerEvaluationDataValueCacher* dataValueCacher, CReasonerEvaluationExtractor::EXTRACTORTYPE extractorType, |
| 135 |
const QString& extractionName, const QString& contextSpecificationName); |
| 136 |
|
| 137 |
CReasonerEvaluationManager* initEvaluationProgram(CEvaluateTestsuiteCommand* evalTestsuiteComm); |
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
CReasonerEvaluationGroupRequestSelector* getSelectors(const QString& requestDirecroty); |
| 142 |
|
| 143 |
|
| 144 |
QString getAnalyserOutputDirectory(const QString& baseDirectory, const QString& evaluationProgramName, const QString& platformName, const QString& analyserName); |
| 145 |
|
| 146 |
|
| 147 |
// protected variables |
| 148 |
protected: |
| 149 |
CConfiguration* mConfig; |
| 150 |
|
| 151 |
QStringList mReasonerNameStringList; |
| 152 |
QStringList mReasonerOutputDirStringList; |
| 153 |
|
| 154 |
cint64 mTestTimeout; |
| 155 |
cint64 mTestCount; |
| 156 |
|
| 157 |
QString mSatisticBasePath; |
| 158 |
QStringList mFailedReasonerStringList; |
| 159 |
QStringList mFitlerStringList; |
| 160 |
CReasonerEvaluationFiltering* mFiltering; |
| 161 |
|
| 162 |
|
| 163 |
bool mOneReasonerFailed; |
| 164 |
bool mAllReasonerFailed; |
| 165 |
|
| 166 |
// private methods |
| 167 |
private: |
| 168 |
|
| 169 |
// private variables |
| 170 |
private: |
| 171 |
|
| 172 |
}; |
| 173 |
|
| 174 |
}; // end namespace Evaluation |
| 175 |
|
| 176 |
}; // end namespace Test |
| 177 |
|
| 178 |
}; // end namespace Konclude |
| 179 |
|
| 180 |
#endif // KONCLUDE_TEST_EVALUATION_CREASONEREVALUATIONMANAGERTHREAD_H |