Skip to content

Instantly share code, notes, and snippets.

@Aaronontheweb
Created October 5, 2025 15:27
Show Gist options
  • Select an option

  • Save Aaronontheweb/ef1eb1f2afa473ced04bfba01491b324 to your computer and use it in GitHub Desktop.

Select an option

Save Aaronontheweb/ef1eb1f2afa473ced04bfba01491b324 to your computer and use it in GitHub Desktop.
Akka.NET MemoryJournal Benchmark Instructions

MemoryJournal Benchmark Instructions

Due to the git worktrees in the development environment, BenchmarkDotNet cannot run properly (it discovers multiple copies of the same project file).

How to Run

From a clean clone of the repository (without worktrees):

git checkout feature/memory-journal-benchmarks
dotnet build src/benchmark/Akka.Benchmarks/Akka.Benchmarks.csproj -c Release
dotnet run --project src/benchmark/Akka.Benchmarks/Akka.Benchmarks.csproj -c Release --no-build --framework net8.0 -- --filter "*MemoryJournal*"

Benchmarks Included

  1. Write_events_to_memory_journal - Baseline write performance
  2. Write_and_replay_events - Recovery performance (write + stop + restart + replay)
  3. Write_tagged_events_and_query - Tagged event handling performance

Each benchmark runs with 10, 100, and 1000 events to measure scalability.

Expected Output

Results will be saved to:

  • BenchmarkDotNet.Artifacts/results/Akka.Benchmarks.Persistence.MemoryJournalBenchmarks-report.html
  • BenchmarkDotNet.Artifacts/results/Akka.Benchmarks.Persistence.MemoryJournalBenchmarks-report.csv
  • BenchmarkDotNet.Artifacts/results/Akka.Benchmarks.Persistence.MemoryJournalBenchmarks-report-github.md

Purpose

These benchmarks establish a performance baseline for the MemoryJournal before/after the race condition fixes in PR #7869.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment