Code Monkey home page Code Monkey logo

actor-benchmarker's Introduction

Aaron Stannard ๐Ÿ‘‹

I build OSS .NET technologies aimed at making it easier to build large-scale applications.

โšก Work

I'm currently the Founder and CEO of Petabridge, a company that provides commercial support, training, and tooling for Akka.NET, one of the OSS projects I founded. We create products like Phobos Akka.NET APM, Petabridge.Cmd Akka.NET CLI, and OSS tools such as NBench - .NET Performance Testing.

Blog Posts

Noticing Skill Issues is Not Gatekeeping - Thu, 30 May 2024 13:14:00 +0000

.NET Developers Begging for Ecosystem Destruction - Mon, 18 Mar 2024 13:14:00 +0000

How to Distribute Roslyn Analyzers via NuGet - Thu, 11 Jan 2024 16:14:00 +0000

Internal vs. External Accountabilities - Mon, 18 Sep 2023 16:14:00 +0000

We're Rewriting Sdkbin - Thu, 10 Aug 2023 16:14:00 +0000

DRY Gone Bad: Bespoke Company Frameworks - Wed, 08 Mar 2023 14:54:04 +0000

Why Self-Fulfilling Prophecies Come True - Fri, 23 Dec 2022 14:54:04 +0000

Beware the Long 'YAGNI' - Tue, 06 Dec 2022 02:22:44 +0000

Reflections on a Decade of Self-Employment - Wed, 17 Aug 2022 12:11:21 +0000

Professional Open Source: Extend-Only Design - Mon, 27 Dec 2021 18:05:09 +0000

actor-benchmarker's People

Contributors

aaronontheweb avatar dependabot[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

actor-benchmarker's Issues

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

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

I ran into a problem with a misconfigured ShardRegion in #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.

Emit Benchmark.NET benchmarks programmatically

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

Ideally, we should try to leverage Benchmark.NET for the actual execution and running of these benchmarks. The IActorBenchmark type is practically set up for this automatically:

public interface IActorBenchmark
{
    IBenchmarkConfiguration Configuration { get; }
    
    Task<(int totalActors, int messagesPerActor)> Setup(CancellationToken ct);
    
    Task Run(CancellationToken ct);
    
    Task Teardown(CancellationToken ct);
}

Describe the solution you'd like

I would like to do the following:

  1. 1 Benchmark should be computed per IActorBenchmarkDefintion;
  2. 1 BenchmarkCase should be computed per unique IBenchmarkConfiguration; and
  3. The InvocationsPerOperation number for each BenchmarkCase should be set programmatically via the `IActorBenchmark.Setup~ computed value, if that's possible.

I believe we should be able to do this by tapping into the Benchmark.NET APIs directly and passing them into the BenchmarkSwitcher - but it will take a bit of meta-programming magic to make this work.

Essentially, we need to make sure this function returns true for whatever wrapping we do around Benchmark.NET:

https://github.com/dotnet/BenchmarkDotNet/blob/570eeefa20c8692662722cd4bf8a1b663bd361b7/src/BenchmarkDotNet/Running/TypeFilter.cs#L12-L45

Describe alternatives you've considered

It might actually be a lot easier to instrument this with NBench, as it allows for dynamic computation of operation invocations in a much more simplified manner than Benchmark.NET.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.