mirror of
https://github.com/RPCS3/discord-bot.git
synced 2026-01-31 01:25:22 +01:00
fix extracting enabled library list
limit simultaneous log parsing to half the cores instead of N-1
This commit is contained in:
committed by
Roberto Anić Banić
parent
6f70baf0bf
commit
7ffd507b5e
@@ -26,7 +26,7 @@ namespace CompatBot.EventHandlers
|
||||
new ZipHandler(),
|
||||
};
|
||||
|
||||
private static readonly SemaphoreSlim QueueLimiter = new SemaphoreSlim(Math.Max(1, Environment.ProcessorCount-1), Math.Max(1, Environment.ProcessorCount - 1));
|
||||
private static readonly SemaphoreSlim QueueLimiter = new SemaphoreSlim(Math.Max(1, Environment.ProcessorCount / 2), Math.Max(1, Environment.ProcessorCount / 2));
|
||||
private delegate void OnLog(MessageCreateEventArgs args);
|
||||
private static event OnLog OnNewLog;
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace CompatBot.EventHandlers.LogParsing
|
||||
internal partial class LogParser
|
||||
{
|
||||
private const RegexOptions DefaultOptions = RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.ExplicitCapture;
|
||||
private const RegexOptions DefaultSingleLineOptions = RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.ExplicitCapture;
|
||||
|
||||
/*
|
||||
* Extractors are defined in terms of trigger-extractor
|
||||
@@ -29,7 +30,7 @@ namespace CompatBot.EventHandlers.LogParsing
|
||||
{
|
||||
Extractors = new Dictionary<string, Regex>
|
||||
{
|
||||
["RPCS3"] = new Regex(@"(?<build_and_specs>.*)\r?$", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.ExplicitCapture),
|
||||
["RPCS3"] = new Regex(@"(?<build_and_specs>.*)\r?$", DefaultSingleLineOptions),
|
||||
},
|
||||
EndTrigger = "·",
|
||||
},
|
||||
@@ -59,7 +60,7 @@ namespace CompatBot.EventHandlers.LogParsing
|
||||
["loop detection:"] = new Regex("detection: (?<spu_loop_detection>.*?)\r?$", DefaultOptions),
|
||||
["Lib Loader:"] = new Regex("[Ll]oader: (?<lib_loader>.*?)\r?$", DefaultOptions),
|
||||
["static functions:"] = new Regex("functions: (?<hook_static_functions>.*?)\r?$", DefaultOptions),
|
||||
["Load libraries:"] = new Regex("libraries: (?<library_list>.*)", DefaultOptions),
|
||||
["Load libraries:"] = new Regex("libraries:(?<library_list>.*?)$", DefaultSingleLineOptions),
|
||||
},
|
||||
EndTrigger = "VFS:",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user