https://github.com/windperson/demoaspnetcoremacrobenchmark
Doing macro benchmark using BenchmarkDotNet on ASP.NET Core Web API, gRPC, Orleans services
https://github.com/windperson/demoaspnetcoremacrobenchmark
aspnetcorewe benchmarkdotnet grpc-csharp microsoft-orleans
Last synced: about 2 months ago
JSON representation
Doing macro benchmark using BenchmarkDotNet on ASP.NET Core Web API, gRPC, Orleans services
- Host: GitHub
- URL: https://github.com/windperson/demoaspnetcoremacrobenchmark
- Owner: windperson
- License: mit
- Created: 2024-09-10T07:01:35.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-16T04:11:51.000Z (6 months ago)
- Last Synced: 2025-06-27T16:48:27.360Z (4 months ago)
- Topics: aspnetcorewe, benchmarkdotnet, grpc-csharp, microsoft-orleans
- Language: C#
- Homepage:
- Size: 5.14 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# 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](https://dotnet.microsoft.com/en-us/apps/aspnet/apis), [gRPC](https://learn.microsoft.com/en-us/aspnet/core/grpc/) and [Microsoft Orleans](https://learn.microsoft.com/en-us/dotnet/orleans/) data transfer object serialization/ de-serialization performance.

## How to run benchmark(s)
To run the benchmark, you need to have the [.NET 8 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) 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:
```sh
dotnet run -c Release -- -f '*'
```
The demo benchmark results will like the [screen shot image](./pics/UbuntuVM_benchmark_results.png).
Also these benchmarks can be run separately:
* Run only the REST API benchmarks:
```sh
dotnet run -c Release -- -f '*REST*'
```* Run only the gRPC benchmarks:
```sh
dotnet run -c Release -- -f '*Grpc*'
```* Run only the Microsoft Orleans benchmarks:
```sh
dotnet run -c Release -- -f '*Orleans*'
```