Skip to content

Rename the benches/ directory to benchmark/ or benchmarks/ #2725

New issue

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

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

Already on GitHub? # to your account

Closed
postmodern opened this issue May 22, 2016 · 9 comments
Closed

Rename the benches/ directory to benchmark/ or benchmarks/ #2725

postmodern opened this issue May 22, 2016 · 9 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-bench S-propose-close Status: A team member has nominated this for closing, pending further input from the team

Comments

@postmodern
Copy link

Rational

  • benches is ambiguous and may confuse English-as-Second-Language (ESL) programmers.
  • benches is only 3 letters shorter than benchmarks, so it's not significantly shorter. benchmark (singular) is only 2 letters longer than benches.
@sunjay
Copy link
Member

sunjay commented Apr 18, 2017

Or at least give us the option to configure it in Cargo.toml! 😄

@alexcrichton
Copy link
Member

@sunjay you should be able to list out benchmarks via [[bench]] in Cargo.toml, no?

@sunjay
Copy link
Member

sunjay commented Apr 19, 2017

I mean it would be nice if it were possible to specify something like:

# section and field names are just examples, not necessarily what the actual names would be
[bench]
location = "benchmarks"

You're right that you can already do this on a case by case basis, but it would be nice to just be able to modify the search path so all the awesome auto discovery features of cargo still work.

@alexcrichton
Copy link
Member

Ah yes that's what I figured, and makes sense to me.

@carols10cents carols10cents added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-bench labels Sep 25, 2017
@link2xt
Copy link

link2xt commented Sep 8, 2023

As any target, [[bench]] can have path setting specified: https://doc.rust-lang.org/cargo/reference/cargo-targets.html#configuring-a-target

@epage
Copy link
Contributor

epage commented Sep 28, 2023

Considering the command is cargo bench and the table for configuring them is bench, calling the directory that hosts them benches doesn't seem far off.

I'd also be concerned about different packages changing this for little benefit, making it harder to jump from project to project.

As for migrating the ecosystem from one to another, I don't see it paying off enough benefit with the name bench so entrenched to make up for the cost to the ecosystem for doing so.

I'm proposing to the cargo team that we close this.

@epage epage added the S-propose-close Status: A team member has nominated this for closing, pending further input from the team label Sep 28, 2023
@epage
Copy link
Contributor

epage commented Sep 28, 2023

Also, I feel like there was a similar issue for making the tests/ configurable but not finding it atm

@weihanglo
Copy link
Member

This could possibly be generalized to “being able to set the path of target auto-discovery”, though I agree it's more beneficial to have a community-wide project layout convention.

Closing this. Let us know if there is something not working well without this feature.

@weihanglo weihanglo closed this as not planned Won't fix, can't repro, duplicate, stale Sep 28, 2023
@epage
Copy link
Contributor

epage commented Sep 28, 2023

Found the related issue: #12672

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-bench S-propose-close Status: A team member has nominated this for closing, pending further input from the team
Projects
None yet
Development

No branches or pull requests

7 participants