diff --git a/DRAMSys/traceAnalyzer/CMakeLists.txt b/DRAMSys/traceAnalyzer/CMakeLists.txt index 58298719..bcc2b512 100644 --- a/DRAMSys/traceAnalyzer/CMakeLists.txt +++ b/DRAMSys/traceAnalyzer/CMakeLists.txt @@ -95,9 +95,7 @@ add_executable(TraceAnalyzer selectmetrics.cpp presentation/util/testlight.cpp presentation/util/togglecollapsedaction.cpp - presentation/tracetesttreewidget.cpp businessObjects/pythoncaller.cpp - businessObjects/tracetestresults.cpp presentation/tracemetrictreewidget.cpp businessObjects/phases/phase.cpp businessObjects/phases/phasedependency.cpp diff --git a/DRAMSys/traceAnalyzer/businessObjects/pythoncaller.cpp b/DRAMSys/traceAnalyzer/businessObjects/pythoncaller.cpp index 741295a3..2df106e8 100644 --- a/DRAMSys/traceAnalyzer/businessObjects/pythoncaller.cpp +++ b/DRAMSys/traceAnalyzer/businessObjects/pythoncaller.cpp @@ -52,8 +52,6 @@ PythonCaller &PythonCaller::instance() } PythonCaller::PythonCaller() : - testModuleName("tests"), - testFunctionName("runTests"), metricModuleName("metrics"), metricFunctionName("calculateMetrics"), getMetricFunctionName("getMetrics"), @@ -73,13 +71,11 @@ PythonCaller::PythonCaller() : PyList_Insert(sysPath, 0, path); Py_DECREF(path); - qDebug() << "Test:" << testModuleName.c_str() << testFunctionName.c_str(); qDebug() << "Metric:" << metricModuleName.c_str() << metricFunctionName.c_str(); qDebug() << "Plot:" << plotsModuleName.c_str() << plotsFunctionName.c_str(); qDebug() << "VcdExport:" << vcdExportModuleName.c_str() << vcdExportFunctionName.c_str(); qDebug() << "Script: " << pathToScripts.c_str(); - pRunTestsFunction = loadFunctionFromModule(testModuleName, testFunctionName); pCalculateMetricsFunction = loadFunctionFromModule(metricModuleName, metricFunctionName); pGenPlotsFunction = loadFunctionFromModule(plotsModuleName, plotsFunctionName); @@ -119,7 +115,6 @@ PyObject *PythonCaller::loadFunctionFromModule(std::string moduleName, std::stri PythonCaller::~PythonCaller() { - Py_DECREF(pRunTestsFunction); Py_DECREF(pCalculateMetricsFunction); Py_DECREF(pGenPlotsFunction); Py_DECREF(pGetMetricsFunction); @@ -149,7 +144,8 @@ PyObject *PythonCaller::callMetricsFunction(PyObject *function, QString argument if (!pResult) { PyErr_Print(); - throw std::runtime_error(std::string("Error in calling " + testFunctionName + " in module " + testModuleName)); + throw std::runtime_error( + std::string("Error in calling " + metricFunctionName + " in module " + metricModuleName)); } return pResult; @@ -169,7 +165,7 @@ PyObject *PythonCaller::callFunctionWithStringArgument(PyObject *function, if (!pResult) { PyErr_Print(); - throw std::runtime_error(std::string("Error in calling " + testFunctionName + " in module " + testModuleName)); + throw std::runtime_error(std::string("Error in calling function with string argument")); } return pResult; @@ -188,24 +184,6 @@ PyObject *PythonCaller::callFunctionWithoutArguments(PyObject *function) return pResult; } -TraceTestResults PythonCaller::runTestsOnTrace(QString pathToTrace) -{ - TraceTestResults traceTestResult(QFileInfo(pathToTrace).baseName()); - PyObject *pResult = callFunctionWithStringArgument(pRunTestsFunction, - pathToTrace); - - for (Py_ssize_t i = 0; i < PyList_Size(pResult); ++i) { - PyObject *currentTestResult = PyList_GetItem(pResult, i); - QString testName(PyUnicode_AsUTF8(PyTuple_GetItem(currentTestResult, 0))); - bool testPassed = (Py_True == PyTuple_GetItem(currentTestResult, 1)); - QString message(PyUnicode_AsUTF8(PyTuple_GetItem(currentTestResult, 2))); - - traceTestResult.addTestResult(TestResult(testName, testPassed, message)); - } - Py_DECREF(pResult); - return traceTestResult; -} - TraceCalculatedMetrics PythonCaller::calculateMetricsOnTrace(QString pathToTrace, std::vector list) { TraceCalculatedMetrics result(QFileInfo(pathToTrace).baseName()); diff --git a/DRAMSys/traceAnalyzer/businessObjects/pythoncaller.h b/DRAMSys/traceAnalyzer/businessObjects/pythoncaller.h index eeb04d7e..3b6a84d8 100644 --- a/DRAMSys/traceAnalyzer/businessObjects/pythoncaller.h +++ b/DRAMSys/traceAnalyzer/businessObjects/pythoncaller.h @@ -49,7 +49,6 @@ #include #include #include -#include "businessObjects/tracetestresults.h" #include "businessObjects/tracecalculatedmetrics.h" class PythonCaller @@ -57,7 +56,6 @@ class PythonCaller public: static PythonCaller &instance(); - TraceTestResults runTestsOnTrace(QString pathToTrace); TraceCalculatedMetrics calculateMetricsOnTrace(QString pathToTrace, std::vector list); std::vector getMetrics(QString pathToTrace); @@ -72,14 +70,13 @@ private: PythonCaller(const PythonCaller &other) = delete; PythonCaller &operator=(const PythonCaller &other) = delete; - PyObject *pRunTestsFunction, *pCalculateMetricsFunction, *pGetMetricsFunction; + PyObject *pCalculateMetricsFunction, *pGetMetricsFunction; PyObject *pGenPlotsFunction; PyObject *pVcdExportFunction = nullptr; PyObject *pVcdExportDependenciesFunction; PyObject *loadFunctionFromModule(std::string moduleName, std::string functionName); - std::string testModuleName, testFunctionName, metricModuleName, - metricFunctionName, getMetricFunctionName, pathToScripts; + std::string metricModuleName, metricFunctionName, getMetricFunctionName, pathToScripts; std::string plotsModuleName; std::string plotsFunctionName; diff --git a/DRAMSys/traceAnalyzer/businessObjects/traceplotlinemodel.cpp b/DRAMSys/traceAnalyzer/businessObjects/traceplotlinemodel.cpp index 2439c43c..e2687e59 100644 --- a/DRAMSys/traceAnalyzer/businessObjects/traceplotlinemodel.cpp +++ b/DRAMSys/traceAnalyzer/businessObjects/traceplotlinemodel.cpp @@ -356,14 +356,16 @@ QString AbstractTracePlotLineModel::getLabel(LineType type) } } -QString AbstractTracePlotLineModel::getLabel(unsigned int rank) +QString AbstractTracePlotLineModel::getLabel(unsigned int rank) const { - return "RA" + QString::number(rank); + std::string_view rankLabel = dataBusType == DataBusType::LegacyMode ? "RA" : "PC"; + return rankLabel.data() + QString::number(rank); } -QString AbstractTracePlotLineModel::getLabel(unsigned int rank, unsigned int group, unsigned int bank) +QString AbstractTracePlotLineModel::getLabel(unsigned int rank, unsigned int group, unsigned int bank) const { - return "RA" + QString::number(rank) + " BG" + QString::number(group) + " BA" + QString::number(bank); + std::string_view rankLabel = dataBusType == DataBusType::LegacyMode ? "RA" : "PC"; + return rankLabel.data() + QString::number(rank) + " BG" + QString::number(group) + " BA" + QString::number(bank); } AbstractTracePlotLineModel::CommandBusType AbstractTracePlotLineModel::getCommandBusType(const GeneralInfo &generalInfo) diff --git a/DRAMSys/traceAnalyzer/businessObjects/traceplotlinemodel.h b/DRAMSys/traceAnalyzer/businessObjects/traceplotlinemodel.h index 768e7f00..556bdd49 100644 --- a/DRAMSys/traceAnalyzer/businessObjects/traceplotlinemodel.h +++ b/DRAMSys/traceAnalyzer/businessObjects/traceplotlinemodel.h @@ -174,8 +174,8 @@ protected: std::shared_ptr createRankGroupNode(unsigned int rank) const; static QString getLabel(LineType type); - static QString getLabel(unsigned int rank); - static QString getLabel(unsigned int rank, unsigned int group, unsigned int bank); + QString getLabel(unsigned int rank) const; + QString getLabel(unsigned int rank, unsigned int group, unsigned int bank) const; static CommandBusType getCommandBusType(const GeneralInfo &generalInfo); static DataBusType getDataBusType(const GeneralInfo &generalInfo); diff --git a/DRAMSys/traceAnalyzer/businessObjects/tracetestresults.cpp b/DRAMSys/traceAnalyzer/businessObjects/tracetestresults.cpp deleted file mode 100644 index 402883b9..00000000 --- a/DRAMSys/traceAnalyzer/businessObjects/tracetestresults.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2015, Technische Universität Kaiserslautern - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the copyright holder nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER - * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Authors: - * Janik Schlemminger - * Robert Gernhardt - * Matthias Jung - */ - -#include "tracetestresults.h" - - -bool TraceTestResults::hasPassedAllTests() const -{ - for (const TestResult &testResult : testResults) { - if (!testResult.hasPassed()) - return false; - } - return true; -} diff --git a/DRAMSys/traceAnalyzer/businessObjects/tracetestresults.h b/DRAMSys/traceAnalyzer/businessObjects/tracetestresults.h deleted file mode 100644 index 148a775d..00000000 --- a/DRAMSys/traceAnalyzer/businessObjects/tracetestresults.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2015, Technische Universität Kaiserslautern - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the copyright holder nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER - * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Authors: - * Janik Schlemminger - * Robert Gernhardt - * Matthias Jung - */ - -#ifndef TRACETESTRESULT_H -#define TRACETESTRESULT_H -#include -#include -#include "testresult.h" - -class TraceTestResults -{ -public: - TraceTestResults(const QString &traceName): traceName(traceName) {} - - void addTestResult(const TestResult &result) - { - testResults.push_back(result); - } - - QString getTraceName() const - { - return traceName; - } - bool hasPassedAllTests() const; - const std::vector &getTestResults() const - { - return testResults; - } -private: - QString traceName; - std::vector testResults; -}; - -#endif // TRACETESTRESULT_H diff --git a/DRAMSys/traceAnalyzer/evaluationtool.cpp b/DRAMSys/traceAnalyzer/evaluationtool.cpp index 155b006d..0bfd9693 100644 --- a/DRAMSys/traceAnalyzer/evaluationtool.cpp +++ b/DRAMSys/traceAnalyzer/evaluationtool.cpp @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include @@ -61,8 +60,6 @@ EvaluationTool::EvaluationTool(QWidget *parent) : ui->setupUi(this); traceFilesModel = new QStandardItemModel(this); ui->listView->setModel(traceFilesModel); - QObject::connect(ui->traceTestTreeWidget, SIGNAL(setMessage(QString)), this, - SLOT(setTestMessage(QString))); selectMetrics = new SelectMetrics(this); QObject::connect(selectMetrics, SIGNAL(getSelectedMetrics()), this, SLOT(getSelectedMetrics())); @@ -81,16 +78,6 @@ void EvaluationTool::showForFiles(QList paths) ui->toolBox->setCurrentIndex(0); } -void EvaluationTool::showAndRunTests(QList paths) -{ - cleanUpUI(); - fillFileList(paths); - show(); - ui->toolBox->setCurrentIndex(0); - selectMetrics->setMetrics(getMetrics()); - runTests(); -} - void EvaluationTool::showAndEvaluateMetrics(QList paths) { cleanUpUI(); @@ -118,9 +105,6 @@ void EvaluationTool::cleanUpUI() traceFilesModel->clear(); calculatedMetrics.clear(); ui->traceMetricTreeWidget->clear(); - ui->traceTestTreeWidget->clear(); - ui->testMessage->setPlainText(QString("")); - ui->testLight->setGray(); } void EvaluationTool::fillFileList(QList paths) @@ -134,43 +118,6 @@ void EvaluationTool::fillFileList(QList paths) } } -void EvaluationTool::on_btn_test_clicked() -{ - runTests(); -} - -void EvaluationTool::runTests() -{ - ui->traceTestTreeWidget->clear(); - ui->testLight->setGray(); - - bool allTestsPassed = true; - bool boxesChecked = false; - - for (int row = 0; row < traceFilesModel->rowCount(); ++row) - { - TraceFileItem *item = static_cast(traceFilesModel->item(row)); - if (item->checkState() == Qt::Checked) - { - boxesChecked = true; - TraceTestResults traceTestResult = PythonCaller::instance().runTestsOnTrace(item->getPath()); - if (!traceTestResult.hasPassedAllTests()) - allTestsPassed = false; - ui->traceTestTreeWidget->addTraceTestResult(traceTestResult); - } - } - - if (!boxesChecked) - return; - - ui->traceTestTreeWidget->expandAll(); - - if (allTestsPassed) - ui->testLight->setGreen(); - else - ui->testLight->setRed(); -} - void EvaluationTool::on_btn_calculateMetrics_clicked() { selectMetrics->raise(); @@ -203,11 +150,6 @@ void EvaluationTool::calculateMetrics(vector selectedMetrics) ui->traceMetricTreeWidget->expandAll(); } -void EvaluationTool::setTestMessage(QString message) -{ - ui->testMessage->setPlainText(message); -} - EvaluationTool::TraceFileItem::TraceFileItem(const QString &path) { this->path = path; diff --git a/DRAMSys/traceAnalyzer/evaluationtool.h b/DRAMSys/traceAnalyzer/evaluationtool.h index 95a232fa..45dc3a89 100644 --- a/DRAMSys/traceAnalyzer/evaluationtool.h +++ b/DRAMSys/traceAnalyzer/evaluationtool.h @@ -65,21 +65,16 @@ public: ~EvaluationTool(); void showForFiles(QList paths); - void showAndRunTests(QList paths); void showAndEvaluateMetrics(QList paths); private Q_SLOTS: - void on_btn_test_clicked(); - void setTestMessage(QString message); void on_btn_calculateMetrics_clicked(); void on_btn_exportCSV_clicked(); void on_btn_genPlots_clicked(); void getSelectedMetrics(); - private: void fillFileList(QList paths); - void runTests(); void cleanUpUI(); void genPlots(); void calculateMetrics(std::vector selectedMetrics); diff --git a/DRAMSys/traceAnalyzer/evaluationtool.ui b/DRAMSys/traceAnalyzer/evaluationtool.ui index a54f5938..6049da33 100644 --- a/DRAMSys/traceAnalyzer/evaluationtool.ui +++ b/DRAMSys/traceAnalyzer/evaluationtool.ui @@ -38,78 +38,15 @@ - 1 + 0 - - - - 0 - 0 - 702 - 436 - - - - Test - - - - - - - - - 1 - - - - - - - - - - Run tests - - - - - - - - - - 0 - 30 - - - - - - - - Message: - - - - - - - - - - - - - - 0 0 - 702 - 436 + 707 + 464 @@ -176,17 +113,6 @@ - - TestLight - QWidget -
presentation/util/testlight.h
- 1 -
- - TraceTestTreeWidget - QTreeWidget -
presentation/tracetesttreewidget.h
-
TraceMetricTreeWidget QTreeWidget diff --git a/DRAMSys/traceAnalyzer/presentation/tracetesttreewidget.cpp b/DRAMSys/traceAnalyzer/presentation/tracetesttreewidget.cpp deleted file mode 100644 index a730d266..00000000 --- a/DRAMSys/traceAnalyzer/presentation/tracetesttreewidget.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2015, Technische Universität Kaiserslautern - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the copyright holder nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER - * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Authors: - * Janik Schlemminger - * Robert Gernhardt - * Matthias Jung - */ - -#include "tracetesttreewidget.h" - -TraceTestTreeWidget::TraceTestTreeWidget(QWidget *parent) : QTreeWidget(parent) -{ - QObject::connect(this, SIGNAL(itemSelectionChanged()), this, - SLOT(itemSelectionChanged())); - setHeaderHidden(true); -} - -void TraceTestTreeWidget::addTraceTestResult(const TraceTestResults - &traceTestResult) -{ - QTreeWidgetItem *top = new QTreeWidgetItem({traceTestResult.getTraceName()}); - addTopLevelItem(top); - - if (traceTestResult.hasPassedAllTests()) - top->setForeground(0, Qt::green); - else - top->setForeground(0, Qt::red); - - for (const TestResult &testResult : traceTestResult.getTestResults()) { - new TestResultTreeItem(top, testResult); - } -} - -void TraceTestTreeWidget::itemSelectionChanged() -{ - if (!selectedItems().isEmpty() - && selectedItems().at(0)->type() == - TestResultTreeItem::testResultTreeItemType) { - TestResultTreeItem *testResultItem = static_cast - (selectedItems().at(0)); - Q_EMIT setMessage(testResultItem->getMessage()); - } else { - setMessage(QString("")); - } -} - -TraceTestTreeWidget::TestResultTreeItem::TestResultTreeItem( - QTreeWidgetItem *parent, const TestResult &testResult) - : QTreeWidgetItem(parent, testResultTreeItemType) -{ - setText(0, testResult.getTestName()); - if (!testResult.hasPassed()) - setForeground(0, Qt::red); - message = testResult.getMessage(); -} diff --git a/DRAMSys/traceAnalyzer/presentation/tracetesttreewidget.h b/DRAMSys/traceAnalyzer/presentation/tracetesttreewidget.h deleted file mode 100644 index 1936b955..00000000 --- a/DRAMSys/traceAnalyzer/presentation/tracetesttreewidget.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2015, Technische Universität Kaiserslautern - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the copyright holder nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER - * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Authors: - * Janik Schlemminger - * Robert Gernhardt - * Matthias Jung - */ - -#ifndef TRACETESTTREEWIDGET_H -#define TRACETESTTREEWIDGET_H -#include -#include - -class TraceTestTreeWidget: public QTreeWidget -{ - Q_OBJECT -public: - TraceTestTreeWidget(QWidget *parent = 0); - void addTraceTestResult(const TraceTestResults &traceTestResult); - -Q_SIGNALS: - void setMessage(QString message); - -private: - class TestResultTreeItem : public QTreeWidgetItem - { - public: - TestResultTreeItem(QTreeWidgetItem *parent, const TestResult &testResult); - static constexpr int testResultTreeItemType = 1002; - QString getMessage() - { - return message; - } - private: - QString message; - }; - -private Q_SLOTS: - void itemSelectionChanged(); -}; - -#endif // TRACETESTTREEWIDGET_H diff --git a/DRAMSys/traceAnalyzer/traceanalyzer.cpp b/DRAMSys/traceAnalyzer/traceanalyzer.cpp index 0eb8fe77..3dbb2000 100644 --- a/DRAMSys/traceAnalyzer/traceanalyzer.cpp +++ b/DRAMSys/traceAnalyzer/traceanalyzer.cpp @@ -77,9 +77,6 @@ TraceAnalyzer::TraceAnalyzer(QSet paths, StartupOption option, for (const QString &path : paths) openTracefileTab(path); - - if (option == StartupOption::runTests) - ui->actionTest->trigger(); } TraceAnalyzer::~TraceAnalyzer() @@ -245,13 +242,6 @@ void TraceAnalyzer::statusChanged(const QString &message) statusLabel->setText(message + QTime::currentTime().toString()); } -void TraceAnalyzer::on_actionTest_triggered() -{ - evaluationTool.raise(); - evaluationTool.activateWindow(); - evaluationTool.showAndRunTests(openedTraceFiles.values()); -} - void TraceAnalyzer::on_actionMetrics_triggered() { evaluationTool.raise(); diff --git a/DRAMSys/traceAnalyzer/traceanalyzer.h b/DRAMSys/traceAnalyzer/traceanalyzer.h index b5e8cdd1..8320fe07 100644 --- a/DRAMSys/traceAnalyzer/traceanalyzer.h +++ b/DRAMSys/traceAnalyzer/traceanalyzer.h @@ -92,7 +92,6 @@ private Q_SLOTS: void on_actionReload_triggered(); void on_actionReload_all_triggered(); void on_actionExportAsVCD_triggered(); - void on_actionTest_triggered(); void on_actionMetrics_triggered(); void on_actionClose_triggered(); void on_actionClose_all_triggered(); diff --git a/DRAMSys/traceAnalyzer/traceanalyzer.ui b/DRAMSys/traceAnalyzer/traceanalyzer.ui index 5fec0849..68871011 100644 --- a/DRAMSys/traceAnalyzer/traceanalyzer.ui +++ b/DRAMSys/traceAnalyzer/traceanalyzer.ui @@ -49,7 +49,7 @@ 0 0 800 - 23 + 34 @@ -64,7 +64,6 @@ - @@ -234,7 +233,8 @@ - + + .. &Simulate... diff --git a/DRAMSys/traceAnalyzer/tracefiletab.cpp b/DRAMSys/traceAnalyzer/tracefiletab.cpp index f776a7a7..282df492 100644 --- a/DRAMSys/traceAnalyzer/tracefiletab.cpp +++ b/DRAMSys/traceAnalyzer/tracefiletab.cpp @@ -86,14 +86,6 @@ TraceFileTab::TraceFileTab(QWidget *parent, const QString &path) std::cout << "Opening new tab for \"" << path.toStdString() << "\"" << std::endl; - initNavigatorAndItsDependentWidgets(path); - setUpFileWatcher(path); - setUpTraceplotScrollbar(); - setUpTraceSelector(); - setUpCommentView(); - - setUpPossiblePhases(); - ui->mcConfigView->setModel(mcConfigModel); ui->mcConfigView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); @@ -109,6 +101,8 @@ TraceFileTab::TraceFileTab(QWidget *parent, const QString &path) setUpTraceplotScrollbar(); setUpCommentView(); + setUpPossiblePhases(); + tracefileChanged(); } @@ -491,6 +485,7 @@ void TraceFileTab::on_startPowerAnalysis_clicked() data->setSamples(*samples); cur->setData(data); cur->attach(ui->powerPlot); + cur->setPen(QPen(QColor(255,0,0))); QwtPlotMagnifier *mag1 = new QwtPlotMagnifier(ui->powerPlot->canvas()); mag1->setAxisEnabled(QwtPlot::xBottom, true); @@ -519,6 +514,7 @@ void TraceFileTab::on_startPowerAnalysis_clicked() data2->setSamples(*samples2); cur2->setData(data2); cur2->attach(ui->bandwidthPlot); + cur2->setPen(QPen(QColor(255,0,0))); ui->bandwidthPlot->setAxisTitle(0,"Bandwidth [%]"); ui->bandwidthPlot->setAxisScale(0,0.0,100.0); @@ -563,6 +559,7 @@ void TraceFileTab::on_startPowerAnalysis_clicked() data3->setSamples(*samples3); cur3->setData(data3); cur3->attach(ui->bufferPlot); + cur3->setPen(QPen(QColor(255,0,0))); ui->bufferPlot->setAxisTitle(0,"Buffer Utilization"); ui->bufferPlot->setAxisScale(0,0.0, maxBufferDepth);