Skip to content

chore: Add custom benchmark configs#61

Merged
neuecc merged 2 commits intoCysharp:mainfrom
filzrev:chore-add-benchmark-configs
Mar 24, 2025
Merged

chore: Add custom benchmark configs#61
neuecc merged 2 commits intoCysharp:mainfrom
filzrev:chore-add-benchmark-configs

Conversation

@filzrev
Copy link
Copy Markdown
Contributor

@filzrev filzrev commented Mar 23, 2025

This PR intended to add functionality to switch BenchmarkConfig via command line arguments.

How to switch benchmark config

By default. DefaultBenchmarkConfig is used.
It's almost same as existing [ShortRunJob] + [MemoryDiagnoser] based benchmarks.

And when following config key is specified as extra argument (e.g. -- Test)
Benchmark is executed with corresponding BenchmarkConfig.

List of custom BenchmarkConfig keys

  • Default
  • InProcess
  • Test (or InProcessMonitoring)
  • ColdStart
  • TargetFrameworks
  • NuGetVersions

What's changed in this PR

  1. Add README.md file.
  2. Add following custom benchmark configs.
    2.1. DefaultBenchmarkConfig
    2.2. InProcessBenchmarkConfig
    2.3. InProcessMonitoringBenchmarkConfig
    2.4. ColdStartBenchmarkConfig
    2.5. TargetFrameworksBenchmarkConfig
    2.6. NuGetVersionsBenchmarkConfig
  3. Modify Benchmark.csproj
    3.1. Add settings for NuGetVersionsBenchmarkConfig
    3.2. Add cleanup target to delete BenchmarkDotNet artifacts.
    2.3. Add Cysharp/Kokuban package to write colored console output.
  4. Modify Program.cs to execute benchmark with custom BenchmarkConfig.
  5. Remove [ShortRunJob] and [MemoryDiagnoser] from existing benchmarks
  6. Remove unrequired arguments from benchmark.yml

@filzrev filzrev force-pushed the chore-add-benchmark-configs branch 2 times, most recently from beb5541 to 7c3bd97 Compare March 23, 2025 15:43
@filzrev filzrev force-pushed the chore-add-benchmark-configs branch from 7c3bd97 to 5d932ef Compare March 23, 2025 15:45
@neuecc
Copy link
Copy Markdown
Member

neuecc commented Mar 24, 2025

Thank you!
I'm also learning a lot about the setup methods.
Thank you for the detailed ReadMe as well.

@neuecc neuecc merged commit 5f9773d into Cysharp:main Mar 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants