Fromatting cleanup for review
This commit is contained in:
parent
f59f4b7d7f
commit
22198ee67c
5 changed files with 19 additions and 21 deletions
|
@ -97,8 +97,8 @@ namespace Ryujinx.HLE.HOS.Services
|
||||||
Logger.PrintDebug(LogClass.KernelIpc, $"{service.GetType().Name}: {processRequest.Method.Name}");
|
Logger.PrintDebug(LogClass.KernelIpc, $"{service.GetType().Name}: {processRequest.Method.Name}");
|
||||||
|
|
||||||
ProfileConfig profile = Profiles.ServiceCall;
|
ProfileConfig profile = Profiles.ServiceCall;
|
||||||
profile.SessionGroup = service.GetType().Name;
|
profile.SessionGroup = service.GetType().Name;
|
||||||
profile.SessionItem = processRequest.Method.Name;
|
profile.SessionItem = processRequest.Method.Name;
|
||||||
|
|
||||||
Profile.Begin(profile);
|
Profile.Begin(profile);
|
||||||
long result = processRequest(context);
|
long result = processRequest(context);
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace Ryujinx.Profiler
|
||||||
public int MaxLevel { get; set; } = 0;
|
public int MaxLevel { get; set; } = 0;
|
||||||
|
|
||||||
// 19531225 = 5 seconds in ticks
|
// 19531225 = 5 seconds in ticks
|
||||||
public long History { get; set; } = 19531225;
|
public long History { get; set; } = 19531225;
|
||||||
|
|
||||||
// Controls
|
// Controls
|
||||||
public NpadDebug Controls;
|
public NpadDebug Controls;
|
||||||
|
|
|
@ -51,7 +51,6 @@ namespace Ryujinx.Profiler
|
||||||
// each begin call increments and each end call decrements
|
// each begin call increments and each end call decrements
|
||||||
private int _depth;
|
private int _depth;
|
||||||
|
|
||||||
|
|
||||||
public TimingInfo()
|
public TimingInfo()
|
||||||
{
|
{
|
||||||
_timestamps = new List<Timestamp>();
|
_timestamps = new List<Timestamp>();
|
||||||
|
|
|
@ -41,14 +41,11 @@ namespace Ryujinx.Profiler.UI
|
||||||
private ProfileButton[] _buttons;
|
private ProfileButton[] _buttons;
|
||||||
|
|
||||||
private bool _initComplete = false;
|
private bool _initComplete = false;
|
||||||
|
|
||||||
private bool _visible = true;
|
private bool _visible = true;
|
||||||
private bool _visibleChanged = true;
|
private bool _visibleChanged = true;
|
||||||
private bool _viewportUpdated = true;
|
private bool _viewportUpdated = true;
|
||||||
private bool _redrawPending = true;
|
private bool _redrawPending = true;
|
||||||
|
|
||||||
private bool _displayGraph = true;
|
private bool _displayGraph = true;
|
||||||
|
|
||||||
private bool _showInactive = true;
|
private bool _showInactive = true;
|
||||||
private bool _paused = false;
|
private bool _paused = false;
|
||||||
private bool _doStep = false;
|
private bool _doStep = false;
|
||||||
|
@ -84,6 +81,7 @@ namespace Ryujinx.Profiler.UI
|
||||||
private bool _prevBackspaceDown = false;
|
private bool _prevBackspaceDown = false;
|
||||||
private double _backspaceDownTime = 0;
|
private double _backspaceDownTime = 0;
|
||||||
|
|
||||||
|
// F35 used as no key
|
||||||
private Key _graphControlKey = Key.F35;
|
private Key _graphControlKey = Key.F35;
|
||||||
|
|
||||||
// Event management
|
// Event management
|
||||||
|
@ -92,7 +90,6 @@ namespace Ryujinx.Profiler.UI
|
||||||
private bool _profileUpdated = false;
|
private bool _profileUpdated = false;
|
||||||
private readonly object _profileDataLock = new object();
|
private readonly object _profileDataLock = new object();
|
||||||
|
|
||||||
|
|
||||||
public ProfileWindow()
|
public ProfileWindow()
|
||||||
// Graphigs mode enables 2xAA
|
// Graphigs mode enables 2xAA
|
||||||
: base(1280, 720, new GraphicsMode(new ColorFormat(8, 8, 8, 8), 1, 1, 2))
|
: base(1280, 720, new GraphicsMode(new ColorFormat(8, 8, 8, 8), 1, 1, 2))
|
||||||
|
@ -553,9 +550,9 @@ namespace Ryujinx.Profiler.UI
|
||||||
|
|
||||||
// Totals
|
// Totals
|
||||||
yHeight = FilterHeight + 2;
|
yHeight = FilterHeight + 2;
|
||||||
_fontService.DrawText($"{totalInstant / PerformanceCounter.TicksPerMillisecond:F3} ({totalCount})", xOffset, yHeight, TitleFontHeight);
|
_fontService.DrawText($"{totalInstant / PerformanceCounter.TicksPerMillisecond:F3} ({totalCount})", xOffset, yHeight, TitleFontHeight);
|
||||||
_fontService.DrawText($"{totalAverage / PerformanceCounter.TicksPerMillisecond:F3}", 150 + xOffset, yHeight, TitleFontHeight);
|
_fontService.DrawText($"{totalAverage / PerformanceCounter.TicksPerMillisecond:F3}", 150 + xOffset, yHeight, TitleFontHeight);
|
||||||
_fontService.DrawText($"{totalTime / PerformanceCounter.TicksPerMillisecond:F3}", 260 + xOffset, yHeight, TitleFontHeight);
|
_fontService.DrawText($"{totalTime / PerformanceCounter.TicksPerMillisecond:F3}", 260 + xOffset, yHeight, TitleFontHeight);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace Ryujinx.Profiler.UI
|
||||||
{
|
{
|
||||||
maxInstant = Math.Max(maxInstant, kvp.Value.Instant);
|
maxInstant = Math.Max(maxInstant, kvp.Value.Instant);
|
||||||
maxAverage = Math.Max(maxAverage, kvp.Value.AverageTime);
|
maxAverage = Math.Max(maxAverage, kvp.Value.AverageTime);
|
||||||
maxTotal = Math.Max(maxTotal, kvp.Value.TotalTime);
|
maxTotal = Math.Max(maxTotal, kvp.Value.TotalTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL.Enable(EnableCap.ScissorTest);
|
GL.Enable(EnableCap.ScissorTest);
|
||||||
|
@ -33,8 +33,8 @@ namespace Ryujinx.Profiler.UI
|
||||||
// Instant
|
// Instant
|
||||||
GL.Color3(Color.Blue);
|
GL.Color3(Color.Blue);
|
||||||
float bottom = GetLineY(yOffset, LineHeight, LinePadding, true, verticalIndex++);
|
float bottom = GetLineY(yOffset, LineHeight, LinePadding, true, verticalIndex++);
|
||||||
float top = bottom + barHeight;
|
float top = bottom + barHeight;
|
||||||
float right = (float)entry.Value.Instant / maxInstant * width + xOffset;
|
float right = (float)entry.Value.Instant / maxInstant * width + xOffset;
|
||||||
|
|
||||||
// Skip rendering out of bounds bars
|
// Skip rendering out of bounds bars
|
||||||
if (top < 0 || bottom > Height)
|
if (top < 0 || bottom > Height)
|
||||||
|
@ -42,17 +42,18 @@ namespace Ryujinx.Profiler.UI
|
||||||
|
|
||||||
GL.Vertex2(xOffset, bottom);
|
GL.Vertex2(xOffset, bottom);
|
||||||
GL.Vertex2(xOffset, top);
|
GL.Vertex2(xOffset, top);
|
||||||
GL.Vertex2(right, top);
|
GL.Vertex2(right, top);
|
||||||
|
|
||||||
GL.Vertex2(right, top);
|
GL.Vertex2(right, top);
|
||||||
GL.Vertex2(right, bottom);
|
GL.Vertex2(right, bottom);
|
||||||
GL.Vertex2(xOffset, bottom);
|
GL.Vertex2(xOffset, bottom);
|
||||||
|
|
||||||
// Average
|
// Average
|
||||||
GL.Color3(Color.Green);
|
GL.Color3(Color.Green);
|
||||||
top += barHeight;
|
top += barHeight;
|
||||||
bottom += barHeight;
|
bottom += barHeight;
|
||||||
right = (float)entry.Value.AverageTime / maxAverage * width + xOffset;
|
right = (float)entry.Value.AverageTime / maxAverage * width + xOffset;
|
||||||
|
|
||||||
GL.Vertex2(xOffset, bottom);
|
GL.Vertex2(xOffset, bottom);
|
||||||
GL.Vertex2(xOffset, top);
|
GL.Vertex2(xOffset, top);
|
||||||
GL.Vertex2(right, top);
|
GL.Vertex2(right, top);
|
||||||
|
@ -63,9 +64,10 @@ namespace Ryujinx.Profiler.UI
|
||||||
|
|
||||||
// Total
|
// Total
|
||||||
GL.Color3(Color.Red);
|
GL.Color3(Color.Red);
|
||||||
top += barHeight;
|
top += barHeight;
|
||||||
bottom += barHeight;
|
bottom += barHeight;
|
||||||
right = (float)entry.Value.TotalTime / maxTotal * width + xOffset;
|
right = (float)entry.Value.TotalTime / maxTotal * width + xOffset;
|
||||||
|
|
||||||
GL.Vertex2(xOffset, bottom);
|
GL.Vertex2(xOffset, bottom);
|
||||||
GL.Vertex2(xOffset, top);
|
GL.Vertex2(xOffset, top);
|
||||||
GL.Vertex2(right, top);
|
GL.Vertex2(right, top);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue