History

fix formating issue in performance stats

ZappoMan committed 11 years ago

Commit ea33c661 parent 9aa9dac1 file · +5 −4Browse files

Showing the changes to interface/src/ui/Stats.cpp (1 of 1 file). Show all

Unified · Split

interface/src/ui/Stats.cpp+5−4
@@ -271,7 +271,7 @@ void Stats::display( · 270 unmodified lines
271 // TODO: the display of these timing details should all be moved to JavaScript271 // TODO: the display of these timing details should all be moved to JavaScript
272 if (_expanded && Menu::getInstance()->isOptionChecked(MenuOption::DisplayTimingDetails)) {272 if (_expanded && Menu::getInstance()->isOptionChecked(MenuOption::DisplayTimingDetails)) {
273 // Timing details...273 // Timing details...
274 verticalOffset += STATS_PELS_PER_LINE * 4; // skip 4 lines to be under the other columns274 verticalOffset += STATS_PELS_PER_LINE * 6; // skip 6 lines to be under the other columns
275 drawText(columnOneHorizontalOffset, verticalOffset, scale, rotation, font, 275 drawText(columnOneHorizontalOffset, verticalOffset, scale, rotation, font,
276 "-------------------------------------------------------- Function "276 "-------------------------------------------------------- Function "
277 "------------------------------------------------------- --msecs- -calls--", color);277 "------------------------------------------------------- --msecs- -calls--", color);
@@ -294,13 +294,14 @@ void Stats::display( · 16 unmodified lines
294 j.toBack();294 j.toBack();
295 while (j.hasPrevious()) {295 while (j.hasPrevious()) {
296 j.previous();296 j.previous();
297 QChar noBreakingSpace = QChar::Nbsp;
297 QString functionName = j.value(); 298 QString functionName = j.value();
298 const PerformanceTimerRecord& record = allRecords.value(functionName);299 const PerformanceTimerRecord& record = allRecords.value(functionName);
299 300
300 QString perfLine = QString("%1: %2 [%3]").301 QString perfLine = QString("%1: %2 [%3]").
301 arg(QString(qPrintable(functionName)), 120).302 arg(QString(qPrintable(functionName)), 120, noBreakingSpace).
302 arg((float)record.getMovingAverage() / (float)USECS_PER_MSEC, 8, 'f', 3).303 arg((float)record.getMovingAverage() / (float)USECS_PER_MSEC, 8, 'f', 3, noBreakingSpace).
303 arg(record.getCount(), 6);304 arg((int)record.getCount(), 6, 10, noBreakingSpace);
304 305
305 verticalOffset += STATS_PELS_PER_LINE;306 verticalOffset += STATS_PELS_PER_LINE;
306 drawText(columnOneHorizontalOffset, verticalOffset, scale, rotation, font, perfLine.toUtf8().constData(), color);307 drawText(columnOneHorizontalOffset, verticalOffset, scale, rotation, font, perfLine.toUtf8().constData(), color);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t