mirror of
https://github.com/Caraxi/mare.client.git
synced 2026-02-21 02:37:42 +01:00
add performance logging on demand, fix minion issues
This commit is contained in:
parent
6cf0ecdef1
commit
44450b24b4
29 changed files with 580 additions and 294 deletions
|
|
@ -156,7 +156,7 @@ public class MarePlugin : MediatorSubscriberBase, IDisposable
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger?.LogWarning(ex.Message);
|
||||
_logger?.LogCritical(ex, "Error during launch of managers");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -203,6 +203,17 @@ public class MarePlugin : MediatorSubscriberBase, IDisposable
|
|||
{
|
||||
_serviceProvider.GetRequiredService<PeriodicFileScanner>().InvokeScan(forced: true);
|
||||
}
|
||||
else if (string.Equals(splitArgs[0], "perf", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (splitArgs.Length > 1 && int.TryParse(splitArgs[1], out var limitBySeconds))
|
||||
{
|
||||
_serviceProvider.GetRequiredService<PerformanceCollector>().PrintPerformanceStats(limitBySeconds);
|
||||
}
|
||||
else
|
||||
{
|
||||
_serviceProvider.GetRequiredService<PerformanceCollector>().PrintPerformanceStats();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OpenUi()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue