Merge pull request #344 from 13xforever/vnext

Update log analyzer
This commit is contained in:
Ilya 2019-06-21 19:53:36 +05:00 committed by GitHub
commit a21c7b49cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 11 deletions

View File

@ -96,6 +96,7 @@ namespace CompatBot.EventHandlers.LogParsing
["Resolution:"] = new Regex("Resolution: (?<resolution>.*?)\r?$", DefaultOptions),
["Aspect ratio:"] = new Regex("Aspect ratio: (?<aspect_ratio>.*?)\r?$", DefaultOptions),
["Frame limit:"] = new Regex("Frame limit: (?<frame_limit>.*?)\r?$", DefaultOptions),
["MSAA:"] = new Regex("MSAA: (?<msaa>.*?)\r?$", DefaultOptions),
["Write Color Buffers:"] = new Regex("Write Color Buffers: (?<write_color_buffers>.*?)\r?$", DefaultOptions),
["VSync:"] = new Regex("VSync: (?<vsync>.*?)\r?$", DefaultOptions),
["GPU texture scaling:"] = new Regex("Use GPU texture scaling: (?<gpu_texture_scaling>.*?)\r?$", DefaultOptions),

View File

@ -148,10 +148,10 @@ namespace CompatBot.Utils.ResultFormatters
$"Resolution Scale: {items["resolution_scale"] ?? "N/A",16}",
$"Resolution Scale Threshold: {items["texture_scale_threshold"] ?? "N/A",6}",
$"Write Color Buffers: {items["write_color_buffers"],13}",
$"Anti-Aliasing: {items["msaa"] ?? "N/A",19}",
$"Anisotropic Filter: {items["af_override"] ?? "N/A",14}",
$"Frame Limit: {items["frame_limit"],21}",
$"VSync: {items["vsync"] ?? "N/A",27}",
$"Native UI: {items["native_ui"] ?? "N/A",23}"
};
return ("GPU Settings", lines);
}

View File

@ -16,8 +16,14 @@ namespace CompatBot.Utils.ResultFormatters
var serial = items["serial"] ?? "";
if (!string.IsNullOrWhiteSpace(items["log_disabled_channels"]) || !string.IsNullOrWhiteSpace(items["log_disabled_channels_multiline"]))
notes.Add("❗ Some logging priorities were modified, please reset and upload a new log");
if (items["enable_tsx"] == "Disabled")
var hasTsx = items["cpu_extensions"]?.Contains("TSX") ?? false;
var hasTsxFa = items["cpu_extensions"]?.Contains("TSX-FA") ?? false;
items["has_tsx"] = hasTsx ? EnabledMark : DisabledMark;
items["has_tsx_fa"] = hasTsxFa ? EnabledMark : DisabledMark;
if (items["enable_tsx"] == "Disabled" && hasTsx && !hasTsxFa)
notes.Add("⚠ TSX support is disabled; performance may suffer");
else if (items["enable_tsx"] == "Enabled" && hasTsxFa)
notes.Add("⚠ Disable TSX support if you experience performance issues");
if (items["spu_lower_thread_priority"] == EnabledMark
&& int.TryParse(items["thread_count"], out var threadCount)
&& threadCount > 4)
@ -192,17 +198,25 @@ namespace CompatBot.Utils.ResultFormatters
notes.Add(" Please consider setting `SPU Decoder` to `Recompiler (LLVM)`");
}
if (items["spu_threads"] is string spuThreads && spuThreads != "2")
if (items["spu_threads"] is string spuThreads)
{
if (int.TryParse(items["thread_count"], out var threadCount))
if (items["has_tsx"] == EnabledMark)
{
if (threadCount > 4)
notes.Add(" `SPU Thread Count` is best to set to `2`");
else if (spuThreads != "1")
notes.Add(" `SPU Thread Count` is best to set to `2` or `1`");
if (spuThreads != "0")
notes.Add(" `SPU Thread Count` is best to set to `Auto`");
}
else if (spuThreads != "2")
{
if (int.TryParse(items["thread_count"], out var threadCount))
{
if (threadCount > 4)
notes.Add(" `SPU Thread Count` is best to set to `2`");
else if (spuThreads != "1")
notes.Add(" `SPU Thread Count` is best to set to `2` or `1`");
}
else
notes.Add(" `SPU Thread Count` is best to set to `2`");
}
else
notes.Add(" `SPU Thread Count` is best to set to `2`");
}
if (items["accurate_xfloat"] is string accurateXfloat && accurateXfloat == EnabledMark)
notes.Add(" `Accurate xFloat` is not required, please disable");

View File

@ -297,7 +297,6 @@ namespace CompatBot.Utils.ResultFormatters
return updateInfo;
return null;
}
private static bool VersionIsTooOld(NameValueCollection items, Match update, UpdateInfo updateInfo)