mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-16 06:20:34 +00:00
Improve monitoring plugin (#3374)
This commit is contained in:
@@ -151,10 +151,12 @@ internal sealed class MonitoringPlugin : OfficialPlugin, IBot, IBotTradeOfferRes
|
||||
return;
|
||||
}
|
||||
|
||||
int officialPluginCount = PluginsCore.ActivePlugins.Count(static plugin => plugin is OfficialPlugin);
|
||||
|
||||
PluginMeasurements = new HashSet<Measurement<int>>(3) {
|
||||
new(PluginsCore.ActivePlugins.Count),
|
||||
new(PluginsCore.ActivePlugins.Count(static plugin => plugin is OfficialPlugin), new KeyValuePair<string, object?>(TagNames.PluginType, "official")),
|
||||
new(PluginsCore.ActivePlugins.Count(static plugin => plugin is not OfficialPlugin), new KeyValuePair<string, object?>(TagNames.PluginType, "custom"))
|
||||
new(officialPluginCount, new KeyValuePair<string, object?>(TagNames.PluginType, "official")),
|
||||
new(PluginsCore.ActivePlugins.Count - officialPluginCount, new KeyValuePair<string, object?>(TagNames.PluginType, "custom"))
|
||||
}.ToFrozenSet();
|
||||
|
||||
Meter = new Meter(MeterName, Version.ToString());
|
||||
|
||||
Reference in New Issue
Block a user