Merge branch 'TA_dynamic_windows' into 'develop'

TA Dynamic Windows and Fixes

See merge request ems/astdm/dram.sys!272
This commit is contained in:
Lukas Steiner
2020-11-25 16:14:15 +01:00
4 changed files with 339 additions and 293 deletions

View File

@@ -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<TraceFileItem *>(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<long> selectedMetrics)
ui->traceMetricTreeWidget->clear();
for (int row = 0; row < traceFilesModel->rowCount(); ++row) {
TraceFileItem *item = static_cast<TraceFileItem *>(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<TraceFileItem *>(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();
}

View File

@@ -24,6 +24,9 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::NoSelection</enum>
</property>
</widget>
</item>
<item>
@@ -43,7 +46,7 @@
<x>0</x>
<y>0</y>
<width>702</width>
<height>432</height>
<height>436</height>
</rect>
</property>
<attribute name="label">
@@ -106,7 +109,7 @@
<x>0</x>
<y>0</y>
<width>702</width>
<height>432</height>
<height>436</height>
</rect>
</property>
<attribute name="label">
@@ -138,11 +141,11 @@
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_genPlots">
<property name="text">
<string>Generate plots</string>
</property>
</widget>
<widget class="QPushButton" name="btn_genPlots">
<property name="text">
<string>Generate plots</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_exportCSV">

View File

@@ -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)

View File

@@ -15,281 +15,305 @@
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="7,0">
<item>
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0">
<item>
<widget class="TracePlot" name="traceplot">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>3</horstretch>
<verstretch>4</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
</widget>
</item>
<item>
<widget class="TraceScroller" name="traceScroller">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>4</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>150</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="minimumSize">
<size>
<width>0</width>
<height>500</height>
</size>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tabSelectedTrans">
<attribute name="title">
<string>Selected Transaction</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="SelectedTransactionTreeWidget" name="selectedTransactionTree">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>3</horstretch>
<verstretch>3</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="itemsExpandable">
<bool>true</bool>
</property>
<property name="sortingEnabled">
<bool>false</bool>
</property>
<property name="animated">
<bool>false</bool>
</property>
<property name="columnCount">
<number>0</number>
</property>
<attribute name="headerStretchLastSection">
<bool>true</bool>
</attribute>
</widget>
</item>
<item>
<widget class="CommentTreeWidget" name="commentTree">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
<horstretch>2</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>200</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<column>
<property name="text">
<string notr="true">1</string>
</property>
</column>
</widget>
</item>
<item>
<widget class="QPlainTextEdit" name="fileDescriptionEdit">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>2</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabLatencyAnalysis">
<attribute name="title">
<string>Latency Analysis</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QPushButton" name="startLatencyAnalysis">
<property name="text">
<string>Start Analysis</string>
</property>
</widget>
</item>
<item>
<widget class="QProgressBar" name="latencyAnalysisProgressBar">
<property name="value">
<number>0</number>
</property>
</widget>
</item>
<item>
<widget class="QwtPlot" name="latencyPlot">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>200</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QTreeView" name="latencyTreeView">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabPowerAnalysis">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>467</width>
<height>0</height>
</size>
</property>
<property name="accessibleName">
<string/>
</property>
<attribute name="title">
<string>Power and Bandwidth Analysis</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QPushButton" name="startPowerAnalysis">
<widget class="QSplitter" name="splitter_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="baseSize">
<size>
<width>1000</width>
<height>0</height>
</size>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QSplitter" name="splitter">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="TracePlot" name="traceplot">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>3</horstretch>
<verstretch>4</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
</widget>
<widget class="TraceScroller" name="traceScroller">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>4</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>150</height>
</size>
</property>
</widget>
</widget>
<widget class="QTabWidget" name="tabWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>500</height>
</size>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tabSelectedTrans">
<attribute name="title">
<string>Selected Transaction</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="SelectedTransactionTreeWidget" name="selectedTransactionTree">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>3</horstretch>
<verstretch>3</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="itemsExpandable">
<bool>true</bool>
</property>
<property name="sortingEnabled">
<bool>false</bool>
</property>
<property name="animated">
<bool>false</bool>
</property>
<property name="columnCount">
<number>0</number>
</property>
<attribute name="headerStretchLastSection">
<bool>true</bool>
</attribute>
</widget>
</item>
<item>
<widget class="CommentTreeWidget" name="commentTree">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
<horstretch>2</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>200</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<column>
<property name="text">
<string>Start Analysis</string>
<string notr="true">1</string>
</property>
</widget>
</item>
<item row="1" column="0">
<layout class="QVBoxLayout" name="verticalLayout_3">
</column>
</widget>
</item>
<item>
<widget class="QPlainTextEdit" name="fileDescriptionEdit">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>2</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabLatencyAnalysis">
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<attribute name="title">
<string>Latency Analysis</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QPushButton" name="startLatencyAnalysis">
<property name="text">
<string>Start Analysis</string>
</property>
</widget>
</item>
<item>
<widget class="QProgressBar" name="latencyAnalysisProgressBar">
<property name="value">
<number>0</number>
</property>
</widget>
</item>
<item>
<widget class="QwtPlot" name="latencyPlot">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>200</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QTreeView" name="latencyTreeView">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabPowerAnalysis">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="accessibleName">
<string/>
</property>
<attribute name="title">
<string>Power and Bandwidth Analysis</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QPushButton" name="startPowerAnalysis">
<property name="text">
<string>Start Analysis</string>
</property>
</widget>
</item>
<item row="1" column="0">
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QGroupBox" name="powerBox">
<property name="title">
<string>Power:</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QGroupBox" name="powerBox">
<property name="title">
<string>Power:</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QwtPlot" name="powerPlot"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="bandwidthBox">
<property name="title">
<string>Bandwidth:</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QwtPlot" name="bandwidthPlot"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="bufferBox">
<property name="title">
<string>Buffer Analysis:</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
<widget class="QwtPlot" name="bufferPlot"/>
</item>
</layout>
</widget>
<widget class="QwtPlot" name="powerPlot"/>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="bandwidthBox">
<property name="title">
<string>Bandwidth:</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QwtPlot" name="bandwidthPlot"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="bufferBox">
<property name="title">
<string>Buffer Analysis:</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
<widget class="QwtPlot" name="bufferPlot"/>
</item>
</layout>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</widget>
</item>
</layout>
</widget>