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 Mar 2, 2017
1 parent 8864415 commit caeb58a
Show file tree
Hide file tree
Showing 4 changed files with 570 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 @@ -222,6 +223,7 @@ MainWindow::MainWindow(QWidget *parent) :

connect(m_parser, &PerfParser::summaryDataAvailable,
this, [this, bottomUpCostModel, topDownCostModel, callerCalleeCostModel, calleesModel, callersModel] (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 @@ -243,6 +245,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));
});

for (int i = 0, c = ui->resultsTabWidget->count(); i < c; ++i) {
Expand Down
Loading

0 comments on commit caeb58a

Please sign in to comment.