Skip to content

Please add an easy way to remove columns #1775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
stephentoub opened this issue Aug 15, 2021 · 1 comment · Fixed by #1890
Closed

Please add an easy way to remove columns #1775

stephentoub opened this issue Aug 15, 2021 · 1 comment · Fixed by #1890
Milestone

Comments

@stephentoub
Copy link
Member

stephentoub commented Aug 15, 2021

For sharing simple results, in a blog post or the like, I don't want to show error, standard deviation, ratio standard deviation, median, nor do I want to show job or toolchain. Right now I need to manually remove those columns from the resulting data every time I run a benchmark. I would like to be able to add a one-liner to have the tool simply not output a set of named columns, whereas today it seems I need to instead start with an empty config and manually add all the columns I do care about (which I actually haven't figured out how to comprehensively do yet).

@mawosoft
Copy link
Contributor

mawosoft commented Nov 9, 2021

This might be of interest: https://github.com/mawosoft/Mawosoft.Extensions.BenchmarkDotNet

using Mawosoft.Extensions.BenchmarkDotNet;

// ...

ManualConfig config = DefaultConfig.Instance
    // Assuming benchmarks for multiple runtimes. See the docs for other job column scenarios.
    .ReplaceColumnCategory(new JobColumnSelectionProvider("-Job -Toolchain"))
    // If the default StatisticsColumnProvider is replaced, ratio column must be added manually (if needed).
    .ReplaceColumnCategory(StatisticColumn.Mean, BaselineRatioColumn.RatioMean);

Using the JobColumnSelectionProvider this way, would also fix #1603.

I already contemplated proposing some of these for integration into BDM, but I'm afraid it might add too much noise to the API surface.

@adamsitnik adamsitnik added this to the v0.13.2 milestone Aug 25, 2022
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 a pull request may close this issue.

3 participants