diff --git a/DRAMSys/traceAnalyzer/evaluationtool.cpp b/DRAMSys/traceAnalyzer/evaluationtool.cpp index 09b96b13..83223bdd 100644 --- a/DRAMSys/traceAnalyzer/evaluationtool.cpp +++ b/DRAMSys/traceAnalyzer/evaluationtool.cpp @@ -143,20 +143,25 @@ void EvaluationTool::runTests() ui->traceTestTreeWidget->clear(); ui->testLight->setGray(); - if (traceFilesModel->rowCount() == 0) - return; - bool allTestsPassed = true; + bool boxesChecked = false; - for (int row = 0; row < traceFilesModel->rowCount(); ++row) { + for (int row = 0; row < traceFilesModel->rowCount(); ++row) + { TraceFileItem *item = static_cast(traceFilesModel->item(row)); - TraceTestResults traceTestResult = pythonCaller.runTestsOnTrace( - item->getPath()); - if (!traceTestResult.hasPassedAllTests()) - allTestsPassed = false; - ui->traceTestTreeWidget->addTraceTestResult(traceTestResult); + if (item->checkState() == Qt::Checked) + { + boxesChecked = true; + TraceTestResults traceTestResult = pythonCaller.runTestsOnTrace(item->getPath()); + if (!traceTestResult.hasPassedAllTests()) + allTestsPassed = false; + ui->traceTestTreeWidget->addTraceTestResult(traceTestResult); + } } + if (!boxesChecked) + return; + ui->traceTestTreeWidget->expandAll(); if (allTestsPassed) @@ -186,10 +191,13 @@ void EvaluationTool::calculateMetrics(vector selectedMetrics) ui->traceMetricTreeWidget->clear(); for (int row = 0; row < traceFilesModel->rowCount(); ++row) { TraceFileItem *item = static_cast(traceFilesModel->item(row)); - TraceCalculatedMetrics result = pythonCaller.calculateMetricsOnTrace( - item->getPath(), selectedMetrics); - calculatedMetrics.push_back(result); - ui->traceMetricTreeWidget->addTraceMetricResults(result); + if (item->checkState() == Qt::Checked) + { + TraceCalculatedMetrics result = pythonCaller.calculateMetricsOnTrace( + item->getPath(), selectedMetrics); + calculatedMetrics.push_back(result); + ui->traceMetricTreeWidget->addTraceMetricResults(result); + } } ui->traceMetricTreeWidget->expandAll(); } @@ -203,7 +211,7 @@ EvaluationTool::TraceFileItem::TraceFileItem(const QString &path) { this->path = path; setText(QFileInfo(this->path).baseName()); - setCheckable( false ); + setCheckable(true); setCheckState(Qt::Checked); setEditable(false); } @@ -238,11 +246,15 @@ void EvaluationTool::genPlots() if (traceFilesModel->rowCount() == 0) return; - for (int row = 0; row < traceFilesModel->rowCount(); ++row) { + for (int row = 0; row < traceFilesModel->rowCount(); ++row) + { TraceFileItem *item = static_cast(traceFilesModel->item(row)); - ui->traceMetricTreeWidget->addTracePlotResults(QFileInfo( + if (item->checkState() == Qt::Checked) + { + ui->traceMetricTreeWidget->addTracePlotResults(QFileInfo( item->getPath()).baseName(), pythonCaller.generatePlotsOnTrace(item->getPath())); + } } ui->traceMetricTreeWidget->expandAll(); } diff --git a/DRAMSys/traceAnalyzer/evaluationtool.ui b/DRAMSys/traceAnalyzer/evaluationtool.ui index cec14f63..a54f5938 100644 --- a/DRAMSys/traceAnalyzer/evaluationtool.ui +++ b/DRAMSys/traceAnalyzer/evaluationtool.ui @@ -24,6 +24,9 @@ 0 + + QAbstractItemView::NoSelection + @@ -43,7 +46,7 @@ 0 0 702 - 432 + 436 @@ -106,7 +109,7 @@ 0 0 702 - 432 + 436 @@ -138,11 +141,11 @@ - - - Generate plots - - + + + Generate plots + + diff --git a/DRAMSys/traceAnalyzer/scripts/metrics.py b/DRAMSys/traceAnalyzer/scripts/metrics.py index cc4e8e5e..c3a9f50f 100644 --- a/DRAMSys/traceAnalyzer/scripts/metrics.py +++ b/DRAMSys/traceAnalyzer/scripts/metrics.py @@ -90,6 +90,13 @@ def memory_idle(connection): return (idle[0]/clk) +@metric +def memory_delayed(connection): + total = memory_total(connection) + active = memory_active(connection) + idle = memory_idle(connection) + return total - active - idle + @metric def memory_utilisation_percent_new(connection): total = memory_total(connection) diff --git a/DRAMSys/traceAnalyzer/tracefiletab.ui b/DRAMSys/traceAnalyzer/tracefiletab.ui index 182c410e..73006015 100644 --- a/DRAMSys/traceAnalyzer/tracefiletab.ui +++ b/DRAMSys/traceAnalyzer/tracefiletab.ui @@ -15,281 +15,305 @@ - - - - - - - - 3 - 4 - - - - - 0 - 0 - - - - Qt::StrongFocus - - - - - - - - 4 - 1 - - - - - 0 - 150 - - - - - - - - - - - - - 0 - 500 - - - - 0 - - - - Selected Transaction - - - - - - - - - 3 - 3 - - - - - 300 - 0 - - - - - 16777215 - 16777215 - - - - true - - - false - - - false - - - 0 - - - true - - - - - - - - 2 - 1 - - - - - 300 - 200 - - - - - 16777215 - 16777215 - - - - - 1 - - - - - - - - true - - - - 2 - 1 - - - - - 300 - 0 - - - - - 16777215 - 16777215 - - - - true - - - - - - - - - - Latency Analysis - - - - - - - - Start Analysis - - - - - - - 0 - - - - - - - - 16777215 - 200 - - - - - - - - QAbstractItemView::NoEditTriggers - - - - - - - - - - true - - - - 0 - 0 - - - - - 467 - 0 - - - - - - - Power and Bandwidth Analysis - - - - + + + + 0 + 0 + + + + + 1000 + 0 + + + + Qt::Horizontal + + + + + 1 + 0 + + + + Qt::Vertical + + + + + 3 + 4 + + + + + 0 + 0 + + + + Qt::StrongFocus + + + + + + 4 + 1 + + + + + 0 + 150 + + + + + + + + 0 + 0 + + + + + 0 + 500 + + + + 0 + + + + Selected Transaction + + + + + + + + + 3 + 3 + + + + + 300 + 0 + + + + + 16777215 + 16777215 + + + + true + + + false + + + false + + + 0 + + + true + + + + + + + + 2 + 1 + + + + + 300 + 200 + + + + + 16777215 + 16777215 + + + - Start Analysis + 1 - - - - + + + + + + + true + + + + 2 + 1 + + + + + 300 + 0 + + + + + 16777215 + 16777215 + + + + true + + + + + + + + + + + 0 + 0 + + + + Latency Analysis + + + + + + + + Start Analysis + + + + + + + 0 + + + + + + + + 16777215 + 200 + + + + + + + + QAbstractItemView::NoEditTriggers + + + + + + + + + + true + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + Power and Bandwidth Analysis + + + + + + Start Analysis + + + + + + + + + Power: + + - - - Power: - - - - - - - - - - - - Bandwidth: - - - - - - - - - - - - Buffer Analysis: - - - - - - - + - - - - - - - - + + + + + + Bandwidth: + + + + + + + + + + + + Buffer Analysis: + + + + + + + + + + + + + +