Skip to content

Doing macro benchmark using BenchmarkDotNet on ASP.NET Core Web API, gRPC, Orleans services

License

Notifications You must be signed in to change notification settings

windperson/DemoAspNetCoreMacroBenchmark

Repository files navigation

Using BenchmarkDotNet for ASP.NET Core (REST API/gRPC/Microsoft Orleans) marco benchmark

This repository contains a macro benchmark project for measure ASP.NET Core REST Web API, gRPC and Microsoft Orleans data transfer object serialization/ de-serialization performance.

screen shot

How to run benchmark(s)

To run the benchmark, you need to have the .NET 8 SDK installed.

  1. Go to the backends folder and run the three PowerShell scripts (start-web-api.ps1, start-grpc-service.ps1, start-orleans-silo.ps1) on each terminal to start the REST API, gRPC and Orleans backends respectively.

  2. Go to the Benchmarks/DemoRemoteMacroBenchmark folder and execute dotnet run command:

    • Run all benchmarks:
    dotnet run -c Release -- -f '*'

    The demo benchmark results will like the screen shot image.
    Also these benchmarks can be run separately:

    • Run only the REST API benchmarks:
    dotnet run -c Release -- -f '*REST*'
    • Run only the gRPC benchmarks:
    dotnet run -c Release -- -f '*Grpc*'
    • Run only the Microsoft Orleans benchmarks:
    dotnet run -c Release -- -f '*Orleans*'

About

Doing macro benchmark using BenchmarkDotNet on ASP.NET Core Web API, gRPC, Orleans services

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published