Skip to content

Commit

Permalink
Add system information to the summary tab to show info about the machine
Browse files Browse the repository at this point in the history
where the perf record was performed.

Also add a scroll bar to the summary tab to support different screen
sizes and to make it have a similar look and feel as the other tabs.

Fixes: #24
  • Loading branch information
nwrogers committed Feb 28, 2017
1 parent 738732b commit 1723eb1
Show file tree
Hide file tree
Showing 4 changed files with 567 additions and 200 deletions.
13 changes: 13 additions & 0 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <KRecursiveFilterProxyModel>
#include <KStandardAction>
#include <KLocalizedString>
#include <KFormat>

#include "aboutdialog.h"
#include "flamegraph.h"
Expand Down Expand Up @@ -171,6 +172,7 @@ MainWindow::MainWindow(QWidget *parent) :

connect(m_parser, &PerfParser::summaryDataAvailable,
this, [this] (const SummaryData& data) {
KFormat format;
ui->appRunTimeValue->setText(formatTimeString(data.applicationRunningTime));
ui->threadCountValue->setText(QString::number(data.threadCount));
ui->processCountValue->setText(QString::number(data.processCount));
Expand All @@ -185,6 +187,17 @@ MainWindow::MainWindow(QWidget *parent) :
} else {
ui->lostMessage->setVisible(false);
}
ui->hostNameValue->setText(data.hostName);
ui->linuxKernelVersionValue->setText(data.linuxKernelVersion);
ui->perfVersionValue->setText(data.perfVersion);
ui->cpuDescriptionValue->setText(data.cpuDescription);
ui->cpuIdValue->setText(data.cpuId);
ui->cpuArchitectureValue->setText(data.cpuArchitecture);
ui->cpusOnlineValue->setText(QString::number(data.cpusOnline));
ui->cpusAvailableValue->setText(QString::number(data.cpusAvailable));
ui->cpuSiblingCoresValue->setText(data.cpuSiblingCores);
ui->cpuSiblingThreadsValue->setText(data.cpuSiblingThreads);
ui->totalMemoryValue->setText(format.formatByteSize(data.totalMemoryInKiB * 1024, 1, KFormat::MetricBinaryDialect));
});

connect(m_parser, &PerfParser::callerCalleeDataAvailable,
Expand Down
Loading

0 comments on commit 1723eb1

Please sign in to comment.