Support for multiple profiling levels
This commit is contained in:
parent
17a70f2b38
commit
5f3a9eade8
5 changed files with 11 additions and 0 deletions
|
@ -66,6 +66,8 @@ namespace Ryujinx.Profiler
|
||||||
{
|
{
|
||||||
if (!ProfilingEnabled())
|
if (!ProfilingEnabled())
|
||||||
return;
|
return;
|
||||||
|
if (config.Level > _settings.MaxLevel)
|
||||||
|
return;
|
||||||
_profileInstance.BeginProfile(config);
|
_profileInstance.BeginProfile(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,6 +76,8 @@ namespace Ryujinx.Profiler
|
||||||
{
|
{
|
||||||
if (!ProfilingEnabled())
|
if (!ProfilingEnabled())
|
||||||
return;
|
return;
|
||||||
|
if (config.Level > _settings.MaxLevel)
|
||||||
|
return;
|
||||||
_profileInstance.EndProfile(config);
|
_profileInstance.EndProfile(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,8 @@ namespace Ryujinx.Profiler
|
||||||
public string SessionGroup;
|
public string SessionGroup;
|
||||||
public string SessionItem;
|
public string SessionItem;
|
||||||
|
|
||||||
|
public int Level;
|
||||||
|
|
||||||
// Private cached variables
|
// Private cached variables
|
||||||
private string _cachedTag;
|
private string _cachedTag;
|
||||||
private string _cachedSession;
|
private string _cachedSession;
|
||||||
|
|
|
@ -11,6 +11,7 @@ namespace Ryujinx.Profiler
|
||||||
public bool FileDumpEnabled { get; set; } = false;
|
public bool FileDumpEnabled { get; set; } = false;
|
||||||
public string DumpLocation { get; set; } = "";
|
public string DumpLocation { get; set; } = "";
|
||||||
public float UpdateRate { get; set; } = 0.1f;
|
public float UpdateRate { get; set; } = 0.1f;
|
||||||
|
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;
|
||||||
|
|
|
@ -75,6 +75,7 @@ namespace Ryujinx
|
||||||
DumpLocation = profilePath,
|
DumpLocation = profilePath,
|
||||||
UpdateRate = (float)((updateRateHz <= 0) ? -1 : 1.0f / updateRateHz),
|
UpdateRate = (float)((updateRateHz <= 0) ? -1 : 1.0f / updateRateHz),
|
||||||
History = (long)(Convert.ToDouble(parser.Value("Profiling_History")) * PerformanceCounter.TicksPerSecond),
|
History = (long)(Convert.ToDouble(parser.Value("Profiling_History")) * PerformanceCounter.TicksPerSecond),
|
||||||
|
MaxLevel = Convert.ToInt32(parser.Value("Profiling_Max_Level")),
|
||||||
});
|
});
|
||||||
|
|
||||||
SystemLanguage SetLanguage = Enum.Parse<SystemLanguage>(parser.Value("System_Language"));
|
SystemLanguage SetLanguage = Enum.Parse<SystemLanguage>(parser.Value("System_Language"));
|
||||||
|
|
|
@ -34,6 +34,9 @@ Profiling_Update_Rate = 4
|
||||||
#Set how long to keep profiling data in seconds, reduce if profiling is taking too much RAM
|
#Set how long to keep profiling data in seconds, reduce if profiling is taking too much RAM
|
||||||
Profiling_History = 5
|
Profiling_History = 5
|
||||||
|
|
||||||
|
#Set the maximum profiling level. Higher values may cause a heavy load on your system but will allow you to profile in more detail.
|
||||||
|
Profiling_Max_Level = 0
|
||||||
|
|
||||||
#System Language list: https://gist.github.com/HorrorTroll/b6e4a88d774c3c9b3bdf54d79a7ca43b
|
#System Language list: https://gist.github.com/HorrorTroll/b6e4a88d774c3c9b3bdf54d79a7ca43b
|
||||||
#Change System Language
|
#Change System Language
|
||||||
System_Language = AmericanEnglish
|
System_Language = AmericanEnglish
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue