You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd quite like to be able to dump statistics at particular times, rather than just wait for a timer to go off.
I'm happy to submit a PR, but wanted to float my design here and see if it meets approval.
The statistics are done by ClientStatisticsManager and SiloStatisticsManager, both of which are internal classes with no public interface. They are each registered as singletons inthe service container.
I propose defining an IStatisticsManager interface with a single Dump method on it. Because the context for registering the singletons is different, I believe I can make both ClientStatisticsManager and SiloStatisticsManager implement IStatisticsManager.
Users wishing to use the manual dump would then use code like this
ISiloHostBuilder builder = new SiloHostBuilder()
.NormalConfigCalls();
var host = builder.Build();
var stats = host.Services.GetService<IStatisticsManager>();
and then stats.Dump() when required.
Does that sound reasonable/correct?
The text was updated successfully, but these errors were encountered:
I'd quite like to be able to dump statistics at particular times, rather than just wait for a timer to go off.
I'm happy to submit a PR, but wanted to float my design here and see if it meets approval.
The statistics are done by ClientStatisticsManager and SiloStatisticsManager, both of which are internal classes with no public interface. They are each registered as singletons inthe service container.
I propose defining an IStatisticsManager interface with a single Dump method on it. Because the context for registering the singletons is different, I believe I can make both ClientStatisticsManager and SiloStatisticsManager implement IStatisticsManager.
Users wishing to use the manual dump would then use code like this
and then stats.Dump() when required.
Does that sound reasonable/correct?
The text was updated successfully, but these errors were encountered: