Aaronontheweb / actor-benchmarker

Tooling for generating automated Akka.NET end-to-end benchmarks for actors.
Apache License 2.0
2 stars 0 forks source link

Need to make it easier to expose / extract logging from `IActorBenchmark`s #8

Open Aaronontheweb opened 10 months ago

Aaronontheweb commented 10 months ago

Is your feature request related to a problem? Please describe.

I ran into a problem with a misconfigured ShardRegion in https://github.com/Aaronontheweb/actor-benchmarker/pull/7 which caused my clustered benchmarks not to run at all. That issue would have been very easy to diagnose if I could have found a way to inject the xUnit ITestOutputHelper into our logging infrastructure. This is something that we do regularly inside the Akka.TestKit, but the current design of the ActorSystemConfigurator<TActor> doesn't make this particularly easy at the moment.

Describe the solution you'd like

I would like some way to configure the logging both of the IHost and the ActorSystem itself. This will probably require two separate optional configuration methods on the API.

Describe alternatives you've considered

In #7 I tried to implement this on the IBenchmarkConfig interface via a special startup method that attached to the IHostBuilder but that wasn't super workable - I suppose I could have made it workable if I instantiated my configuration inside my test, so maybe this approach is worth revisiting.

Additional context

Probably need to make this work both for unit tests and Benchmark.NET execution.

Aaronontheweb commented 10 months ago

Goal of this feature is to make it easier for debugging - ideally we want these log settings off during a real benchmark.