Feature/2621 add export name for joined exports - #3214
Conversation
Document the new --title command-line option for customizing joined summary titles and export file names in benchmarks. Updated console-args.md and IntroJoin.md with descriptions and usage examples.
Introduce a Title property to IConfig and its implementations, enabling users to set a custom summary title and base name for exported result files when using joined summaries. Add fluent config methods and a --title CLI option. Update summary joining logic and config builders to support the new property.
Added unit tests to verify correct parsing, preservation, and fallback behavior of the Title property in configuration and summary classes. Ensured command-line parsing, immutable config creation, and summary joining all handle custom and default titles as expected.
|
@timcassell this is up for approval/merge |
|
Does it not affect the title of non-joined summaries? Should it? |
|
@timcassell |
|
I think it should. The simplest fix looks like would be to prepend the title in the single type case in BenchmarkDotNet/src/BenchmarkDotNet/Exporters/ExporterBase.cs Lines 57 to 58 in 95d469d $"{summary.Title}-{FolderNameHelper.ToFolderName(targets.Single())}"With an added benefit of preventing overwriting multiple run results (the same way the joined title behaves). Also, this option should override the log file name. Currently it looks like the log file uses different logic and results in a different name than the exported files, it might be good to unify them. |
|
@timcassell BenchmarkDotNet.Samples.IntroBasic-20260730-101112-BenchmarkDotNet.Samples.IntroBasic-report.csv The type name lands twice whenever no custom title is set. The prepend only adds information when the title is custom. |
|
We should redesign how it works, then. The implementation for |
Refactor file naming to use summary titles derived from benchmarked types or custom config/CLI titles. Introduce TitleHelper to ensure unique, valid, and truncated artifact names, preventing overwrites. Update docs, tests, and related code to use the new naming logic.
…ated documentation
|
This was the redesign I did The design
I have included a screenshot of testing this locally. Let me know if this implementation suffices
|

#2621
These implementations were carried out:
Added a configurable Title on the config, used as the joined summary's title. This drives the exported file names (via ExporterBase.GetFileName → summary.
Title for multi-type/joined summaries). When unset, the existing BenchmarkRun-joined-{timestamp} default is used, so behavior is unchanged for everyone else..
You can now set it two ways:
// Fluent API
ManualConfig.Create(DefaultConfig.Instance).WithTitle("MyBenchmarks");
// CLI
--join --title=MyBenchmarks
<title>.WithTitle("MyCustomBenchmarks")MyCustomBenchmarks-report.csv/-report-github.md/-report.htmlMyCustomBenchmarks--join --title CliCustomTitleCliCustomTitle-report.csv/...CliCustomTitleBenchmarkRun-joined-2026-07-29-15-25-19-report.csv/...BenchmarkRun-joined-2026-07-29-15-25-19